diff --git a/src/com/wentch/redkale/source/EntityCache.java b/src/com/wentch/redkale/source/EntityCache.java index eae9c4f13..13e655173 100644 --- a/src/com/wentch/redkale/source/EntityCache.java +++ b/src/com/wentch/redkale/source/EntityCache.java @@ -106,7 +106,7 @@ public final class EntityCache { Stream stream = listStream(); if (filter != null) stream = stream.filter(filter); Collector collector = null; - final Class valtype = reckonAttr.type(); + final Class valtype = reckonAttr == null ? null : reckonAttr.type(); switch (reckon) { case AVG: if (valtype == float.class || valtype == Float.class || valtype == double.class || valtype == Double.class) {