Skip to content

Commit

Permalink
CB-5238 fix creating connection with url
Browse files Browse the repository at this point in the history
  • Loading branch information
yagudin10 committed Jun 27, 2024
1 parent de1ad0e commit eee54dc
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ public static void setConnectionConfiguration(DBPDriver driver, DBPConnectionCon
}

private static void setMainProperties(DBPConnectionConfiguration dsConfig, WebConnectionConfig config) {
if (CommonUtils.isNotEmpty(config.getUrl())) {
dsConfig.setUrl(config.getUrl());
return;
}
if (config.getMainProperties() != null) {
for (Map.Entry<String, Object> e : config.getMainProperties().entrySet()) {
switch (e.getKey()) {
Expand All @@ -218,10 +222,6 @@ private static void setMainProperties(DBPConnectionConfiguration dsConfig, WebCo
}
return;
}
if (CommonUtils.isNotEmpty(config.getUrl())) {
dsConfig.setUrl(config.getUrl());
return;
}
if (config.getHost() != null) {
dsConfig.setHostName(config.getHost());
}
Expand Down

0 comments on commit eee54dc

Please sign in to comment.