From fa6bf4d3e75073c97b816aed9669eca6b40d6c0e Mon Sep 17 00:00:00 2001 From: zyyang Date: Tue, 5 Jan 2021 15:03:55 +0800 Subject: [PATCH] change --- .../src/main/java/com/taosdata/example/JDBCDemo.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/examples/JDBC/JDBCDemo/src/main/java/com/taosdata/example/JDBCDemo.java b/tests/examples/JDBC/JDBCDemo/src/main/java/com/taosdata/example/JDBCDemo.java index f27659da0e..e39eb6a69f 100644 --- a/tests/examples/JDBC/JDBCDemo/src/main/java/com/taosdata/example/JDBCDemo.java +++ b/tests/examples/JDBC/JDBCDemo/src/main/java/com/taosdata/example/JDBCDemo.java @@ -16,7 +16,7 @@ public class JDBCDemo { host = args[++i]; if ("-driverType".equalsIgnoreCase(args[i]) && i < args.length - 1) { driverType = args[++i]; - if (!"jni".equalsIgnoreCase(driverType) || !"restful".equalsIgnoreCase(driverType)) + if (!"jni".equalsIgnoreCase(driverType) && !"restful".equalsIgnoreCase(driverType)) printHelp(); } } @@ -40,10 +40,10 @@ public class JDBCDemo { private void init() { // get connection try { - if (driverType.equals("jni")) { - Class.forName("com.taosdata.jdbc.TSDBDriver"); - } else { + if (driverType.equals("restful")) { Class.forName("com.taosdata.jdbc.rs.RestfulDriver"); + } else { + Class.forName("com.taosdata.jdbc.TSDBDriver"); } Properties properties = new Properties(); properties.setProperty("host", host); -- GitLab