From b9f13e3a84701496e6747ed9fcd1693ad36f5094 Mon Sep 17 00:00:00 2001 From: lidongy <1879087903@qq.com> Date: Thu, 24 Feb 2022 17:21:02 +0800 Subject: [PATCH 1/2] =?UTF-8?q?REPORT-67108=20fix:=20sql=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E7=9B=91=E6=8E=A7=E6=9F=A5=E8=AF=A2=20=E3=80=90=E8=BD=AC?= =?UTF-8?q?=E4=B8=93=E4=BA=BA=E6=9C=8D=E5=8A=A1-Liuhaixia=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fr/third/alibaba/druid/util/Utils.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/fine-druid/src/main/java/com/fr/third/alibaba/druid/util/Utils.java b/fine-druid/src/main/java/com/fr/third/alibaba/druid/util/Utils.java index c8ca0b0f5..dadf7dbd1 100644 --- a/fine-druid/src/main/java/com/fr/third/alibaba/druid/util/Utils.java +++ b/fine-druid/src/main/java/com/fr/third/alibaba/druid/util/Utils.java @@ -242,14 +242,20 @@ public class Utils { ClassLoader ctxClassLoader = Thread.currentThread().getContextClassLoader(); if (ctxClassLoader != null) { try { - return clazz = ctxClassLoader.loadClass(className); + return ctxClassLoader.loadClass(className); } catch (ClassNotFoundException e) { // skip } } try { - clazz = Class.forName(className); + return Class.forName(className); + } catch (ClassNotFoundException e) { + // skip + } + + try { + return ClassLoaderFactory.loadClass(className); } catch (ClassNotFoundException e) { // skip } From e91dd4b5b5afc9e7af495fd2d2315cc05f3011fa Mon Sep 17 00:00:00 2001 From: lidongy <1879087903@qq.com> Date: Thu, 24 Feb 2022 17:22:35 +0800 Subject: [PATCH 2/2] =?UTF-8?q?REPORT-67108=20fix:=20sql=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=E7=9B=91=E6=8E=A7=E6=9F=A5=E8=AF=A2=20=E3=80=90=E8=BD=AC?= =?UTF-8?q?=E4=B8=93=E4=BA=BA=E6=9C=8D=E5=8A=A1-Liuhaixia=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/fr/third/alibaba/druid/util/Utils.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/fine-druid/src/main/java/com/fr/third/alibaba/druid/util/Utils.java b/fine-druid/src/main/java/com/fr/third/alibaba/druid/util/Utils.java index dadf7dbd1..0939fb3e6 100644 --- a/fine-druid/src/main/java/com/fr/third/alibaba/druid/util/Utils.java +++ b/fine-druid/src/main/java/com/fr/third/alibaba/druid/util/Utils.java @@ -233,8 +233,6 @@ public class Utils { } public static Class loadClass(String className) { - Class clazz = null; - if (className == null) { return null; } @@ -260,7 +258,7 @@ public class Utils { // skip } - return clazz; + return null; } private static Date startTime;