【fix sonar】oConvertUtils文件
This commit is contained in:
+6
-5
@@ -194,7 +194,7 @@ public class oConvertUtils {
|
||||
}
|
||||
return result;
|
||||
} catch (NumberFormatException e) {
|
||||
return null;
|
||||
return new Integer[0];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,12 +241,13 @@ public class oConvertUtils {
|
||||
}
|
||||
|
||||
public static long stringToLong(String str) {
|
||||
Long test = new Long(0);
|
||||
long test = 0L;
|
||||
try {
|
||||
test = Long.valueOf(str);
|
||||
test = Long.parseLong(str);
|
||||
} catch (Exception e) {
|
||||
log.error("异常",e);
|
||||
}
|
||||
return test.longValue();
|
||||
return test;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -609,7 +610,7 @@ public class oConvertUtils {
|
||||
*/
|
||||
public static<F,T> List<T> entityListToModelList(List<F> fromList, Class<T> tClass){
|
||||
if(fromList == null || fromList.isEmpty()){
|
||||
return null;
|
||||
return Collections.emptyList();
|
||||
}
|
||||
List<T> tList = new ArrayList<>();
|
||||
for(F f : fromList){
|
||||
|
||||
Reference in New Issue
Block a user