Skip to content

Commit 56f4545

Browse files
guojn1astor194
authored andcommitted
[fix][driver-client] The client is not compatible with multiple different drivers
1 parent 445aeb6 commit 56f4545

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dingo-driver/client/src/main/java/io/dingodb/driver/client/DingoDriverClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public Connection connect(String url, Properties info) throws SQLException {
106106
ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment();
107107
//env.setRole(DingoRole.JDBC);
108108
if ((props = this.parseURL(url, info)) == null) {
109-
throw new IllegalArgumentException("Bad url: " + url);
109+
return null;
110110
} else {
111111
log.info("info:" + props);
112112
env.putAll(props);
@@ -185,7 +185,7 @@ private Properties parseURL(String url, Properties defaults) throws SQLException
185185
hostAndPort = hostStuff;
186186
String[] hostPortPair = parseHostPortPair(hostAndPort);
187187
if (hostPortPair.length != 2) {
188-
throw new IllegalArgumentException("Bad url: " + url);
188+
return null;
189189
}
190190
if (hostPortPair[0] != null && hostPortPair[0].trim().length() > 0) {
191191
urlProps.setProperty("remoteHost", hostPortPair[0]);

0 commit comments

Comments
 (0)