【fix sonar】MyClassLoader文件
This commit is contained in:
+4
-3
@@ -1,6 +1,7 @@
|
|||||||
package com.jero.common.util;
|
package com.jero.common.util;
|
||||||
|
|
||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
|
import org.apache.poi.ss.formula.functions.T;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
@@ -8,8 +9,8 @@ import java.io.File;
|
|||||||
* @Author 张代浩
|
* @Author 张代浩
|
||||||
*/
|
*/
|
||||||
public class MyClassLoader extends ClassLoader {
|
public class MyClassLoader extends ClassLoader {
|
||||||
public static Class getClassByScn(String className) {
|
public static Class<?> getClassByScn(String className) {
|
||||||
Class myclass;
|
Class<?> myclass;
|
||||||
try {
|
try {
|
||||||
myclass = Class.forName(className);
|
myclass = Class.forName(className);
|
||||||
} catch (ClassNotFoundException e) {
|
} catch (ClassNotFoundException e) {
|
||||||
@@ -29,7 +30,7 @@ public class MyClassLoader extends ClassLoader {
|
|||||||
return object.getClass().getName();
|
return object.getClass().getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getAppPath(Class cls) {
|
public static String getAppPath(Class<T> cls) {
|
||||||
// 检查用户传入的参数是否为空
|
// 检查用户传入的参数是否为空
|
||||||
if (cls == null) {
|
if (cls == null) {
|
||||||
throw new java.lang.IllegalArgumentException("参数不能为空!");
|
throw new java.lang.IllegalArgumentException("参数不能为空!");
|
||||||
|
|||||||
Reference in New Issue
Block a user