fix doip crash

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

View File

@ -17,17 +17,23 @@ 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<>();
try {
for (String name : allName) { for (String name : allName) {
Class<?> clz; Class<?> clz;
try { try {
clz = Class.forName(String.format("%s.%sUtil", UtilRegistry.class.getPackage().getName(), name)); clz = Class.forName(String.format("%s.%sUtil", UtilRegistry.class.getPackage().getName(), name));
ret.add(clz); ret.add(clz);
} catch (ClassNotFoundException e) { } catch (Throwable e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
} catch (Throwable e) {
LOGGER.info("Load UtilMet Exception:" + e.getMessage());
e.printStackTrace();
}
return ret; return ret;
} }