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

This commit is contained in:
2025-05-21 22:21:39 +08:00
parent 0f3e94f32f
commit a07a2dcd65
12 changed files with 26 additions and 27 deletions

View File

@@ -155,7 +155,7 @@ public class GlobalExceptionHandler {
}
String sizeLimit;
Throwable cause = e.getCause();
if (null != cause) {
if (cause != null) {
msg = msg.concat(cause.getMessage().toLowerCase());
}
if (msg.contains("larger than")) {

View File

@@ -106,7 +106,7 @@ public class MyBatisPlusMetaObjectHandler implements MetaObjectHandler {
private void fillFieldValue(MetaObject metaObject, String fieldName, Object fillFieldValue, boolean isOverride) {
if (metaObject.hasSetter(fieldName)) {
Object fieldValue = metaObject.getValue(fieldName);
setFieldValByName(fieldName, null != fieldValue && !isOverride ? fieldValue : fillFieldValue, metaObject);
setFieldValByName(fieldName, fieldValue != null && !isOverride ? fieldValue : fillFieldValue, metaObject);
}
}
}