Skip to content

Commit

Permalink
Throw IllegalArgumentException instead of NullPointerException
Browse files Browse the repository at this point in the history
  • Loading branch information
bivashy committed Feb 22, 2024
1 parent a0e256a commit 7d2f3d0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public enum ImportSourceType {
}

private static ImportingSourceSettings extract(ImportingSettings settings, String key) {
return settings.sourceSettings(key).orElseThrow(() -> new NullPointerException("Cannot find importing source settings from key '" + key + "'"));
return settings.sourceSettings(key).orElseThrow(() -> new IllegalArgumentException("Cannot find importing source settings from key '" + key + "'"));
}

public ImportSource create(ImportingSettings settings) {
Expand Down

0 comments on commit 7d2f3d0

Please sign in to comment.