Fix possible NPE (#8199)

this is a follow-up to #7043

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

*
d2c6399a6e

but it doesn't really verify anything, since the NPE is throw/caught and
same behavior occurs
This commit is contained in:
Trask Stalnaker 2023-04-03 00:24:14 -07:00 committed by GitHub
parent 46e5219f19
commit 70cd8464e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -53,6 +53,9 @@ public enum JdbcConnectionUrlParser {
}
String path = uri.getPath();
if (path == null) {
path = "";
}
if (path.startsWith("/")) {
path = path.substring(1);
}