Browse Source

Merge pull request #5096 in CORE/base-third from final/11.0 to release/11.0

* commit '9d2dedea5f95ae49df4b79f1de3d9b70133285fd':
  REPORT-67108 fix: sql执行监控查询 【转专人服务-Liuhaixia】
  REPORT-67108 fix: sql执行监控查询 【转专人服务-Liuhaixia】
bugfix/KERNEL-11409-jackson
superman 3 years ago
parent
commit
a9f652a402
  1. 14
      fine-druid/src/main/java/com/fr/third/alibaba/druid/util/Utils.java

14
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) { public static Class<?> loadClass(String className) {
Class<?> clazz = null;
if (className == null) { if (className == null) {
return null; return null;
} }
@ -242,19 +240,25 @@ public class Utils {
ClassLoader ctxClassLoader = Thread.currentThread().getContextClassLoader(); ClassLoader ctxClassLoader = Thread.currentThread().getContextClassLoader();
if (ctxClassLoader != null) { if (ctxClassLoader != null) {
try { try {
return clazz = ctxClassLoader.loadClass(className); return ctxClassLoader.loadClass(className);
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
// skip // skip
} }
} }
try { try {
clazz = Class.forName(className); return Class.forName(className);
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
// skip // skip
} }
return clazz; try {
return ClassLoaderFactory.loadClass(className);
} catch (ClassNotFoundException e) {
// skip
}
return null;
} }
private static Date startTime; private static Date startTime;

Loading…
Cancel
Save