Skip to content

Commit

Permalink
fix_issue:CodePhiliaX#1440
Browse files Browse the repository at this point in the history
  • Loading branch information
Erional committed Jul 4, 2024
1 parent 9b1bfad commit a43eade
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,11 @@ public String replaceDatabaseInJdbcUrl(String url, String newDatabase) {
String urlWithoutParams = urlAndParams[0];

// Split string at "/" character in URL
String[] parts = urlWithoutParams.split("/");
String[] parts=new String[4];
String[] splitParts = urlWithoutParams.split("/");
for (int i = 0; i < splitParts.length; i++) {
parts[i] = splitParts[i];
}

// Take the last part, the database name, and replace it with the new database name
parts[parts.length - 1] = newDatabase;
Expand Down

0 comments on commit a43eade

Please sign in to comment.