fix ld
This commit is contained in:
@@ -41,10 +41,10 @@ public class TrimAndUpperDeserializer extends StdDeserializer<String> implements
|
||||
public String deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) throws IOException, JsonProcessingException {
|
||||
String s = jsonParser.getText();
|
||||
if (!(StringUtils.isEmpty(s) || Objects.isNull(executeType))) {
|
||||
if (ExecuteType.ALL.equals(executeType) || ExecuteType.TRIM.equals(executeType)) {
|
||||
if (ExecuteType.ALL == executeType || ExecuteType.TRIM == executeType) {
|
||||
s = StringUtils.replace(StringUtils.trim(s)," ","");
|
||||
}
|
||||
if (ExecuteType.ALL.equals(executeType) || ExecuteType.TRIM.equals(executeType)) {
|
||||
if (ExecuteType.ALL == executeType || ExecuteType.TRIM == executeType) {
|
||||
s = StringUtils.upperCase(s);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,15 +55,15 @@ public class TrimAndUpperFormatterFactory implements
|
||||
return value;
|
||||
}
|
||||
// 去所有空格
|
||||
if (ExecuteType.ALL.equals(executeType) || ExecuteType.REPLACE_ALL.equals(executeType)) {
|
||||
if (ExecuteType.ALL == executeType || ExecuteType.REPLACE_ALL == executeType) {
|
||||
value = StringUtils.replace(value, " ", "");
|
||||
}
|
||||
// 转大写
|
||||
if (ExecuteType.ALL.equals(executeType) || ExecuteType.UPPER_CASE.equals(executeType)) {
|
||||
if (ExecuteType.ALL == executeType || ExecuteType.UPPER_CASE == executeType) {
|
||||
value = StringUtils.upperCase(value);
|
||||
}
|
||||
//去两边空格
|
||||
if (ExecuteType.ALL.equals(executeType) || ExecuteType.TRIM.equals(executeType)) {
|
||||
if (ExecuteType.ALL == executeType || ExecuteType.TRIM == executeType) {
|
||||
value = StringUtils.trim(value);
|
||||
}
|
||||
return value;
|
||||
|
||||
@@ -73,6 +73,7 @@ public class CookieUtils {
|
||||
cookie.setPath(path);
|
||||
cookie.setHttpOnly(false);
|
||||
cookie.setMaxAge(maxAge);
|
||||
cookie.setSecure(true);
|
||||
return cookie;
|
||||
} catch (Exception e) {
|
||||
log.error("------创建Cookie时,系统异常:{0}", e);
|
||||
@@ -97,6 +98,7 @@ public class CookieUtils {
|
||||
Cookie tempCookie = new Cookie(name, "");
|
||||
tempCookie.setMaxAge(0);
|
||||
tempCookie.setPath("/");
|
||||
tempCookie.setSecure(true);
|
||||
if (!StringUtils.isEmpty(domain)) {
|
||||
tempCookie.setDomain(domain);
|
||||
}
|
||||
|
||||
@@ -46,9 +46,9 @@ public class ParameterizedTypeImpl implements ParameterizedType {
|
||||
// Probably incorrect - comparing Object[] arrays with Arrays.equals
|
||||
if (!Arrays.equals(actualTypeArguments, that.actualTypeArguments))
|
||||
return false;
|
||||
if (ownerType != null ? !ownerType.equals(that.ownerType) : that.ownerType != null)
|
||||
if (ownerType != null ? ownerType != that.ownerType : that.ownerType != null)
|
||||
return false;
|
||||
return rawType != null ? rawType.equals(that.rawType) : that.rawType == null;
|
||||
return rawType != null ? rawType != that.rawType : that.rawType == null;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.senmesh.common.validation.util;
|
||||
|
||||
import com.senmesh.common.constant.CommonConstants;
|
||||
import com.senmesh.common.exception.util.Assert;
|
||||
import java.util.Locale;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import javax.validation.ConstraintViolation;
|
||||
@@ -130,7 +131,7 @@ public class ValidateUtils {
|
||||
}
|
||||
char idCardLast = charArray[17];
|
||||
int idCardMod = sum % 11;
|
||||
if (idCardY[idCardMod].toUpperCase().equals(String.valueOf(idCardLast).toUpperCase())) {
|
||||
if (idCardY[idCardMod].toUpperCase(Locale.ROOT).equals(String.valueOf(idCardLast).toUpperCase(Locale.ROOT))) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user