Skip to content

Commit

Permalink
Fix possible NPE (#8199)
Browse files Browse the repository at this point in the history
this is a follow-up to #7043

I tried to add a test when that PR was opened:

*
trask@d2c6399

but it doesn't really verify anything, since the NPE is throw/caught and
same behavior occurs
  • Loading branch information
trask authored Apr 3, 2023
1 parent 46e5219 commit 70cd846
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ DbInfo.Builder doParse(String jdbcUrl, DbInfo.Builder builder) {
}

String path = uri.getPath();
if (path == null) {
path = "";
}
if (path.startsWith("/")) {
path = path.substring(1);
}
Expand Down

0 comments on commit 70cd846

Please sign in to comment.