This commit is contained in:
xingyu4j 2022-12-01 09:39:20 +08:00
parent 9cea44e446
commit 9d3bbdd8c4
2 changed files with 3 additions and 3 deletions

View File

@ -1,12 +1,10 @@
package cn.iocoder.yudao.framework.common.util.object; package cn.iocoder.yudao.framework.common.util.object;
import cn.hutool.core.util.ArrayUtil;
import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.ReflectUtil; import cn.hutool.core.util.ReflectUtil;
import java.lang.reflect.Field; import java.lang.reflect.Field;
import java.util.Arrays; import java.util.Arrays;
import java.util.Objects;
import java.util.function.Consumer; import java.util.function.Consumer;
/** /**
@ -47,6 +45,7 @@ public class ObjectUtils {
return obj1.compareTo(obj2) > 0 ? obj1 : obj2; return obj1.compareTo(obj2) > 0 ? obj1 : obj2;
} }
@SafeVarargs
public static <T> T defaultIfNull(T... array) { public static <T> T defaultIfNull(T... array) {
for (T item : array) { for (T item : array) {
if (item != null) { if (item != null) {
@ -56,6 +55,7 @@ public class ObjectUtils {
return null; return null;
} }
@SafeVarargs
public static <T> boolean equalsAny(T obj, T... array) { public static <T> boolean equalsAny(T obj, T... array) {
return Arrays.asList(array).contains(obj); return Arrays.asList(array).contains(obj);
} }

View File

@ -1,6 +1,6 @@
{ {
"name": "ruoyi-vue-pro-vue3", "name": "ruoyi-vue-pro-vue3",
"version": "1.6.4.1863", "version": "1.6.5.1863",
"description": "基于vue3、vite3、element-plus、typesScript", "description": "基于vue3、vite3、element-plus、typesScript",
"author": "xingyu", "author": "xingyu",
"private": false, "private": false,