diff --git a/chat2db-server/chat2db-spi/src/main/java/ai/chat2db/spi/sql/IDriverManager.java b/chat2db-server/chat2db-spi/src/main/java/ai/chat2db/spi/sql/IDriverManager.java index b57674643..1d1862d29 100644 --- a/chat2db-server/chat2db-spi/src/main/java/ai/chat2db/spi/sql/IDriverManager.java +++ b/chat2db-server/chat2db-spi/src/main/java/ai/chat2db/spi/sql/IDriverManager.java @@ -106,7 +106,7 @@ public static Connection getConnection(String url, Properties info, DriverConfig public static DriverPropertyInfo[] getProperty(DriverConfig driver) throws SQLException { - if (driver == null) { + if (Objects.isNull(driver)) { return null; } DriverEntry driverEntry = DRIVER_ENTRY_MAP.get(driver.getJdbcDriver()); @@ -114,7 +114,7 @@ public static DriverPropertyInfo[] getProperty(DriverConfig driver) driverEntry = getJDBCDriver(driver); } try { - String url = driver.getUrl() == null ? "" : driver.getUrl(); + String url = Objects.isNull(driver.getUrl()) ? "" : driver.getUrl(); return driverEntry.getDriver().getPropertyInfo(url, null); } catch (Exception var7) { return null;