style: 优化 == 及 != 表达式格式

1.将 null 或常量值调整到符号左侧
2.将无特殊意义的方法判空写法改为表达式判断写法
This commit is contained in:
2023-08-15 23:31:50 +08:00
parent 94f88bad22
commit 487fa82306
23 changed files with 67 additions and 72 deletions

View File

@@ -69,7 +69,7 @@ public class PageDataVO<V> implements Serializable {
* @return 分页信息
*/
public static <T, V> PageDataVO<V> build(IPage<T> page, Class<V> targetClass) {
if (page == null) {
if (null == page) {
return null;
}
PageDataVO<V> pageDataVO = new PageDataVO<>();
@@ -88,7 +88,7 @@ public class PageDataVO<V> implements Serializable {
* @return 分页信息
*/
public static <V> PageDataVO<V> build(IPage<V> page) {
if (page == null) {
if (null == page) {
return null;
}
PageDataVO<V> pageDataVO = new PageDataVO<>();