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