fix doip crash

This commit is contained in:
CaiHQ 2021-12-20 13:52:22 +08:00
parent 2f38b8743a
commit 00c44ebb46

View File

@ -17,16 +17,22 @@ public class UtilRegistry {
public static Map<String, String> stubClzNameMap = new HashMap<>();
public static List<Class<?>> getUtilClasses() {
List<String> allName = Permission.allName();
List<Class<?>> ret = new ArrayList<>();
for (String name : allName) {
Class<?> clz;
try {
clz = Class.forName(String.format("%s.%sUtil", UtilRegistry.class.getPackage().getName(), name));
ret.add(clz);
} catch (ClassNotFoundException e) {
e.printStackTrace();
try {
for (String name : allName) {
Class<?> clz;
try {
clz = Class.forName(String.format("%s.%sUtil", UtilRegistry.class.getPackage().getName(), name));
ret.add(clz);
} catch (Throwable e) {
e.printStackTrace();
}
}
} catch (Throwable e) {
LOGGER.info("Load UtilMet Exception:" + e.getMessage());
e.printStackTrace();
}
return ret;
}