From 50cc8ffd0be7c535c816659c54a46eb19df0f7d9 Mon Sep 17 00:00:00 2001 From: Julien HENRY Date: Wed, 8 Oct 2014 17:53:03 +0200 Subject: [PATCH] SONAR-5030 Remove log about deregistered driver --- .../java/org/sonar/batch/bootstrap/JdbcDriverHolder.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/JdbcDriverHolder.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/JdbcDriverHolder.java index 99f5f028978..87eca7394bc 100644 --- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/JdbcDriverHolder.java +++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/JdbcDriverHolder.java @@ -32,7 +32,6 @@ import java.io.InputStream; import java.net.MalformedURLException; import java.net.URL; import java.net.URLClassLoader; -import java.util.List; /** * Contains and provides class loader extended with the JDBC Driver hosted on the server-side. @@ -143,7 +142,7 @@ public class JdbcDriverHolder { String indexContent = serverClient.request(url); // File is empty when H2 is used if (Strings.isNullOrEmpty(indexContent)) { - return new String[]{}; + return new String[] {}; } return indexContent.split("\\|"); } catch (Exception e) { @@ -177,11 +176,7 @@ public class JdbcDriverHolder { Class lpClass = defineClass("org.sonar.batch.bootstrap.JdbcLeakPrevention", classBytes, 0, offset, this.getClass().getProtectionDomain()); Object obj = lpClass.newInstance(); - List driverNames = (List) obj.getClass().getMethod("unregisterDrivers").invoke(obj); - - for (String name : driverNames) { - LOG.debug("To prevent a memory leak, the JDBC Driver [{}] has been forcibly deregistered", name); - } + obj.getClass().getMethod("unregisterDrivers").invoke(obj); } catch (Exception e) { LOG.warn("JDBC driver deregistration failed", e); } finally { -- 2.39.5