mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
bug fixed for classloader
This commit is contained in:
@@ -217,6 +217,12 @@ public class Utils {
|
||||
if (className == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
try {
|
||||
return Class.forName(className);
|
||||
} catch (ClassNotFoundException e) {
|
||||
// skip
|
||||
}
|
||||
|
||||
ClassLoader ctxClassLoader = Thread.currentThread().getContextClassLoader();
|
||||
if (ctxClassLoader != null) {
|
||||
@@ -227,15 +233,7 @@ public class Utils {
|
||||
}
|
||||
}
|
||||
|
||||
if (clazz != null) {
|
||||
return clazz;
|
||||
}
|
||||
|
||||
try {
|
||||
return Class.forName(className);
|
||||
} catch (ClassNotFoundException e) {
|
||||
return null;
|
||||
}
|
||||
return clazz;
|
||||
}
|
||||
|
||||
private static Date startTime;
|
||||
|
||||
Reference in New Issue
Block a user