代码优化
This commit is contained in:
@@ -93,7 +93,7 @@ public class IpUtils {
|
||||
}
|
||||
|
||||
public static byte[] textToNumericFormatV4(String paramString) {
|
||||
if (paramString.length() == 0) {
|
||||
if (paramString.isEmpty()) {
|
||||
return null;
|
||||
}
|
||||
byte[] arrayOfByte = new byte[4];
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.jeesite.common.utils;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Calendar;
|
||||
@@ -7,8 +9,6 @@ import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
/**
|
||||
* 身份证工具类
|
||||
*
|
||||
@@ -152,7 +152,7 @@ public class IdcardUtils extends StringUtils {
|
||||
int iSum17 = getPowerSum(iCard);
|
||||
// 获取校验位
|
||||
String sVal = getCheckCode18(iSum17);
|
||||
if (sVal.length() > 0) {
|
||||
if (!sVal.isEmpty()) {
|
||||
idCard18 += sVal;
|
||||
} else {
|
||||
return null;
|
||||
@@ -205,7 +205,7 @@ public class IdcardUtils extends StringUtils {
|
||||
int iSum17 = getPowerSum(iCard);
|
||||
// 获取校验位
|
||||
String val = getCheckCode18(iSum17);
|
||||
if (val.length() > 0) {
|
||||
if (!val.isEmpty()) {
|
||||
if (val.equalsIgnoreCase(code18)) {
|
||||
bTrue = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user