【fix sonar】MyClassLoader文件

This commit is contained in:
梁琦涛
2023-03-08 12:02:27 +08:00
parent 74d09a897a
commit 6d3129afea
@@ -1,5 +1,7 @@
package com.jero.common.util; package com.jero.common.util;
import com.jero.common.exception.JeroBootException;
/** /**
* @Author 张代浩 * @Author 张代浩
*/ */
@@ -10,7 +12,7 @@ public class MyClassLoader extends ClassLoader {
myclass = Class.forName(className); myclass = Class.forName(className);
} catch (ClassNotFoundException e) { } catch (ClassNotFoundException e) {
e.printStackTrace(); e.printStackTrace();
throw new RuntimeException(className+" not found!"); throw new JeroBootException(className+" not found!");
} }
return myclass; return myclass;
} }
@@ -85,7 +87,7 @@ public class MyClassLoader extends ClassLoader {
try { try {
realPath = java.net.URLDecoder.decode(realPath, "utf-8"); realPath = java.net.URLDecoder.decode(realPath, "utf-8");
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); throw new JeroBootException(e);
} }
return realPath; return realPath;
}// getAppPath定义结束 }// getAppPath定义结束