mirror of
https://github.com/didi/KnowStreaming.git
synced 2025-12-24 20:22:12 +08:00
fix ldap bug
This commit is contained in:
@@ -2,6 +2,7 @@ package com.xiaojukeji.know.streaming.km.common.utils;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -56,6 +57,18 @@ public class ValidateUtils {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static <T> boolean isNotEmpty(T[] array) {
|
||||
return !isEmpty(array);
|
||||
}
|
||||
|
||||
public static boolean isEmpty(Object[] array) {
|
||||
return getLength(array) == 0;
|
||||
}
|
||||
|
||||
public static int getLength(Object array) {
|
||||
return array == null ? 0 : Array.getLength(array);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是空字符串
|
||||
*/
|
||||
@@ -65,7 +78,7 @@ public class ValidateUtils {
|
||||
} else if (isNull(seq1) || isNull(seq2) || seq1.size() != seq2.size()) {
|
||||
return false;
|
||||
}
|
||||
for (Object elem: seq1) {
|
||||
for (Object elem : seq1) {
|
||||
if (!seq2.contains(elem)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user