@SuppressWarnings("all") boolean isSingleNonEntityResult(QueryMethod method, Collection<?> result) { Class<?> methodReturnType = method.getReturnedObjectType(); methodReturnType = methodReturnType != null ? methodReturnType : Void.class; return nullSafeSize(result) == 1 && !Void.TYPE.equals(methodReturnType) && !method.isCollectionQuery(); }
@SuppressWarnings("all") boolean isSingleNonEntityResult(QueryMethod method, Collection<?> result) { Class<?> methodReturnType = method.getReturnedObjectType(); methodReturnType = methodReturnType != null ? methodReturnType : Void.class; return nullSafeSize(result) == 1 && !Void.TYPE.equals(methodReturnType) && !method.isCollectionQuery(); }