修正部分参数
This commit is contained in:
@ -723,32 +723,32 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils
|
|||||||
|
|
||||||
|
|
||||||
public static BigDecimal getBigDecimal(Object s){
|
public static BigDecimal getBigDecimal(Object s){
|
||||||
|
BigDecimal result;
|
||||||
try {
|
try {
|
||||||
return new BigDecimal(s.toString());
|
result = new BigDecimal(s.toString());
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
return BigDecimal.ZERO;
|
return BigDecimal.ZERO;
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Long getLong(Object s){
|
public static Long getLong(Object s){
|
||||||
|
Long result;
|
||||||
try {
|
try {
|
||||||
return Long.parseLong(s.toString());
|
result = Long.parseLong(s.toString());
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
return Long.parseLong("0");
|
return Long.parseLong("0");
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getString(Object s){
|
public static String getString(Object s){
|
||||||
|
String result;
|
||||||
try {
|
try {
|
||||||
return String.valueOf(s);
|
result = String.valueOf(s);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
return "0";
|
return "0";
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
}
|
}
|
Reference in New Issue
Block a user