Skip to content

Commit

Permalink
fix: Throw an exception if the driver cannot parse the URL instead of…
Browse files Browse the repository at this point in the history
… returning NULL fixes Issue #2421 (#2441)
  • Loading branch information
davecramer committed Feb 16, 2022
1 parent 7624a44 commit 50f6d51
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pgjdbc/src/main/java/org/postgresql/Driver.java
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ private Properties loadDefaultProperties() throws IOException {
}
// parse URL and add more properties
if ((props = parseURL(url, props)) == null) {
return null;
throw new PSQLException(
GT.tr("Unable to parse URL "),
PSQLState.UNEXPECTED_ERROR);
}
try {

Expand Down

0 comments on commit 50f6d51

Please sign in to comment.