diff --git a/src/connector/jdbc/pom.xml b/src/connector/jdbc/pom.xml
index da0c5b12d4..0fed63fc80 100755
--- a/src/connector/jdbc/pom.xml
+++ b/src/connector/jdbc/pom.xml
@@ -48,11 +48,6 @@
-
- org.apache.commons
- commons-lang3
- ${commons-lang3.version}
-
junit
junit
diff --git a/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBDriver.java b/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBDriver.java
index 02d642d643..e25bd64c73 100755
--- a/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBDriver.java
+++ b/src/connector/jdbc/src/main/java/com/taosdata/jdbc/TSDBDriver.java
@@ -14,8 +14,6 @@
*****************************************************************************/
package com.taosdata.jdbc;
-import org.apache.commons.lang3.StringUtils;
-
import java.sql.*;
import java.util.Properties;
import java.util.logging.Logger;
@@ -42,9 +40,8 @@ import java.util.logging.Logger;
public class TSDBDriver implements java.sql.Driver {
@Deprecated
- private static final String URL_PREFIX1 = "jdbc:TSDB://";
-
- private static final String URL_PREFIX = "jdbc:TAOS://";
+ private static final String URL_PREFIX1 = "jdbc:tsdb://";
+ private static final String URL_PREFIX = "jdbc:taos://";
/**
* Key used to retrieve the database value from the properties instance passed
@@ -188,7 +185,7 @@ public class TSDBDriver implements java.sql.Driver {
}
public boolean acceptsURL(String url) throws SQLException {
- return StringUtils.isNotBlank(url) && url.startsWith(URL_PREFIX);
+ return (url != null && url.length() > 0 && url.trim().length() > 0) && url.toLowerCase().startsWith(URL_PREFIX);
}
public DriverPropertyInfo[] getPropertyInfo(String url, Properties info) throws SQLException {
@@ -238,7 +235,8 @@ public class TSDBDriver implements java.sql.Driver {
return null;
}
- if (!StringUtils.startsWithIgnoreCase(url, URL_PREFIX) && !StringUtils.startsWithIgnoreCase(url, URL_PREFIX1)) {
+ String lowerUrl = url.toLowerCase();
+ if (!lowerUrl.startsWith(URL_PREFIX) && !lowerUrl.startsWith(URL_PREFIX1)) {
return null;
}