This commit is contained in:
Redkale
2016-07-06 22:05:39 +08:00
parent 6b228f1fc9
commit 4f950d5874

View File

@@ -383,7 +383,7 @@ public final class EntityCache<T> {
}
public T[] update(final T value, final Collection<Attribute<T, Serializable>> attrs, final FilterNode node) {
if (value == null || node == null) return null;
if (value == null || node == null) return (T[]) Array.newInstance(type, 0);
T[] rms = this.list.stream().filter(node.createPredicate(this)).toArray(len -> (T[]) Array.newInstance(type, len));
for (T rs : rms) {
for (Attribute attr : attrs) {