style: 调整代码风格 null == xx => xx == null(更符合大众风格)

This commit is contained in:
2025-06-01 11:09:12 +08:00
parent f83a901626
commit 265d90fa4c
21 changed files with 34 additions and 34 deletions

View File

@@ -68,7 +68,7 @@ public class JsonMaskSerializer extends JsonSerializer<String> implements Contex
@Override
public JsonSerializer<?> createContextual(SerializerProvider serializerProvider,
BeanProperty beanProperty) throws JsonMappingException {
if (null == beanProperty) {
if (beanProperty == null) {
return serializerProvider.findNullValueSerializer(null);
}
if (!Objects.equals(beanProperty.getType().getRawClass(), String.class)) {
@@ -76,7 +76,7 @@ public class JsonMaskSerializer extends JsonSerializer<String> implements Contex
}
JsonMask jsonMaskAnnotation = ObjectUtil.defaultIfNull(beanProperty.getAnnotation(JsonMask.class), beanProperty
.getContextAnnotation(JsonMask.class));
if (null == jsonMaskAnnotation) {
if (jsonMaskAnnotation == null) {
return serializerProvider.findValueSerializer(beanProperty.getType(), beanProperty);
}
return new JsonMaskSerializer(jsonMaskAnnotation);