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..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; } @@ -242,19 +240,25 @@ 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 } - return clazz; + try { + return ClassLoaderFactory.loadClass(className); + } catch (ClassNotFoundException e) { + // skip + } + + return null; } private static Date startTime;