bug fixed for classloader

This commit is contained in:
wenshao
2014-01-05 21:18:21 +08:00
parent e97dc43805
commit dba6659543
@@ -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;