This commit is contained in:
地平线
2015-10-28 11:25:58 +08:00
parent e035e71fca
commit 622ad66095

View File

@@ -476,12 +476,14 @@ public class FilterNode {
case NOTIN: case NOTIN:
Predicate<T> filter; Predicate<T> filter;
if (val instanceof Collection) { if (val instanceof Collection) {
Collection array = (Collection) val;
if (array.isEmpty()) return null;
filter = new Predicate<T>() { filter = new Predicate<T>() {
@Override @Override
public boolean test(T t) { public boolean test(T t) {
Object rs = attr.get(t); Object rs = attr.get(t);
return rs != null && ((Collection) val).contains(rs); return rs != null && array.contains(rs);
} }
@Override @Override
@@ -490,6 +492,7 @@ public class FilterNode {
} }
}; };
} else { } else {
if (Array.getLength(val) < 1) return null;
Class type = val.getClass(); Class type = val.getClass();
if (type == int[].class) { if (type == int[].class) {
filter = new Predicate<T>() { filter = new Predicate<T>() {