From 00c44ebb467f4b01419fd3f639983abebe3b94c1 Mon Sep 17 00:00:00 2001 From: CaiHQ Date: Mon, 20 Dec 2021 13:52:22 +0800 Subject: [PATCH] fix doip crash --- .../bdware/sc/boundry/utils/UtilRegistry.java | 20 ++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/bdware/sc/boundry/utils/UtilRegistry.java b/src/main/java/org/bdware/sc/boundry/utils/UtilRegistry.java index 920c241..f456a1c 100644 --- a/src/main/java/org/bdware/sc/boundry/utils/UtilRegistry.java +++ b/src/main/java/org/bdware/sc/boundry/utils/UtilRegistry.java @@ -17,16 +17,22 @@ public class UtilRegistry { public static Map stubClzNameMap = new HashMap<>(); public static List> getUtilClasses() { + List allName = Permission.allName(); List> 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; }