Skip to content

Conversation

@misolt
Copy link
Member

@misolt misolt commented Sep 15, 2025

Running, for example:

my-dumper-executable --connector snowflake --assessment

used to cause a NPE (due to the missing --user flag):

********************************************************************
java.lang.NullPointerException
        at java.util.Hashtable.put(Hashtable.java:460)
        at com.google.edwmigration.dumper.application.dumper.connector.snowflake.AbstractSnowflakeConnector.createUserPasswordDataSource(AbstractSnowflakeConnector.java:130)
        at com.google.edwmigration.dumper.application.dumper.connector.snowflake.AbstractSnowflakeConnector.open(AbstractSnowflakeConnector.java:95)
        at com.google.edwmigration.dumper.application.dumper.MetadataDumper.run(MetadataDumper.java:143)
        at com.google.edwmigration.dumper.application.dumper.MetadataDumper.run(MetadataDumper.java:89)
        at com.google.edwmigration.dumper.application.dumper.Main.main(Main.java:62)
********************************************************************

Make it throw a usage exception instead:

ERROR com.google.edwmigration.dumper.application.dumper.Main - Required username was not provided.
Please use the '--user' flag to provide the username.

Additionally, this improves test coverage (don't listen to the bot).

@github-actions
Copy link

github-actions bot commented Sep 15, 2025

Code Coverage Report

Overall Project 61.61% -0.24% 🍏
Files changed 59.42% 🍏

File Coverage
AbstractSnowflakeConnector.java 73.18% -21.88% 🍏

@misolt misolt changed the title Snowflake test Fix: Snowflake NPE on bad arguments Sep 15, 2025
@misolt misolt marked this pull request as ready for review September 15, 2025 12:15
@misolt misolt merged commit 0daf8ed into main Sep 15, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants