Skip to content

Commit

Permalink
fixed pattern that discovers DB name
Browse files Browse the repository at this point in the history
  • Loading branch information
alexradzin committed Nov 15, 2023
1 parent cd0ae87 commit 3eba254
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
@CustomLog
public class FireboltProperties {

private static final Pattern DB_PATH_PATTERN = Pattern.compile("([a-zA-Z0-9_*\\-]+)");
private static final Pattern DB_PATH_PATTERN = Pattern.compile("/?([a-zA-Z0-9_*\\-]+)");
private static final int FIREBOLT_SSL_PROXY_PORT = 443;
private static final int FIREBOLT_NO_SSL_PROXY_PORT = 9090;

Expand Down Expand Up @@ -176,7 +176,7 @@ private static String getDatabase(Properties properties, String path) throws Ill
return null;
} else {
Matcher m = DB_PATH_PATTERN.matcher(path);
if (m.find()) {
if (m.matches()) {
return m.group(1);
} else {
throw new IllegalArgumentException(format("The database provided is invalid %s", path));
Expand Down

0 comments on commit 3eba254

Please sign in to comment.