From 4c1a1d862c0b9ee63ea475cf142b2f5ad02c82ea Mon Sep 17 00:00:00 2001 From: Alex Bogdanovski Date: Fri, 27 Aug 2021 19:16:39 +0300 Subject: [PATCH] fixed build --- .../java/com/erudika/para/persistence/H2Utils.java | 2 +- .../java/com/erudika/para/persistence/SqlUtils.java | 11 ----------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/src/main/java/com/erudika/para/persistence/H2Utils.java b/src/main/java/com/erudika/para/persistence/H2Utils.java index 1bb07ae..e86063f 100644 --- a/src/main/java/com/erudika/para/persistence/H2Utils.java +++ b/src/main/java/com/erudika/para/persistence/H2Utils.java @@ -113,8 +113,8 @@ protected static void shutdownClient() { if (server != null) { server.stop(); server = null; + org.h2.Driver.unload(); } - org.h2.Driver.unload(); } diff --git a/src/main/java/com/erudika/para/persistence/SqlUtils.java b/src/main/java/com/erudika/para/persistence/SqlUtils.java index 56f6830..686d8f6 100755 --- a/src/main/java/com/erudika/para/persistence/SqlUtils.java +++ b/src/main/java/com/erudika/para/persistence/SqlUtils.java @@ -34,7 +34,6 @@ import org.slf4j.LoggerFactory; import java.sql.Connection; -import java.sql.Driver; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; @@ -44,7 +43,6 @@ import java.util.ArrayList; import java.util.List; import java.util.Collections; -import java.util.Enumeration; import java.util.LinkedHashMap; import java.util.Map; @@ -139,15 +137,6 @@ protected static void shutdownClient() { hikariDataSource.close(); hikariDataSource = null; } - Enumeration drivers = DriverManager.getDrivers(); - while (drivers.hasMoreElements()) { - Driver driver = drivers.nextElement(); - try { - DriverManager.deregisterDriver(driver); - } catch (SQLException e) { - logger.error(null, e); - } - } } private static String getTableSchema() {