Skip to content

Commit

Permalink
Fix derby directory connection string parser (#12479)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaydeluca authored Oct 21, 2024
1 parent 8635be6 commit a1c3728
Show file tree
Hide file tree
Showing 2 changed files with 251 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,12 @@ DbInfo.Builder doParse(String jdbcUrl, DbInfo.Builder builder) {
builder.subtype("directory").host(null).port(null);
String urlInstance = details.substring("directory:".length());
if (!urlInstance.isEmpty()) {
instance = urlInstance;
int dbNameStartLocation = urlInstance.lastIndexOf('/');
if (dbNameStartLocation != -1) {
instance = urlInstance.substring(dbNameStartLocation + 1);
} else {
instance = urlInstance;
}
}
} else if (details.startsWith("classpath:")) {
builder.subtype("classpath").host(null).port(null);
Expand Down
Loading

0 comments on commit a1c3728

Please sign in to comment.