Browse Source

Merge pull request #5088 in CORE/base-third from final/11.0 to persist/11.0

* commit '1b35fcb8b317324ff9d8f4e9e717d5a04e5fa245':
  REPORT-67108 fix: sql执行监控查询 【转专人服务-Liuhaixia】
  REPORT-67108 fix: sql执行监控查询 【转专人服务-Liuhaixia】
persist/jsy11
superman 3 years ago
parent
commit
dc983010fc
  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