Implemented: Refactor EntityUtil findBy methods using Stream API
(OFBIZ-10537) Fixed variable name to make it more meaningful git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1839926 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -465,11 +465,11 @@ public final class EntityUtil {
|
||||
return null;
|
||||
}
|
||||
|
||||
Stream<T> tStream = genericValueList.stream().map(genericValue -> UtilGenerics.cast(genericValue.get(fieldName)));
|
||||
Stream<T> fieldListStream = genericValueList.stream().map(genericValue -> UtilGenerics.cast(genericValue.get(fieldName)));
|
||||
if (distinct) {
|
||||
return tStream.distinct().collect(toList());
|
||||
return fieldListStream.distinct().collect(toList());
|
||||
} else {
|
||||
return tStream.collect(toList());
|
||||
return fieldListStream.collect(toList());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user