Author: pgil
Date: Mon Sep 3 09:33:21 2018
New Revision: 1839926
URL:
http://svn.apache.org/viewvc?rev=1839926&view=revLog:
Implemented: Refactor EntityUtil findBy methods using Stream API
(OFBIZ-10537)
Fixed variable name to make it more meaningful
Modified:
ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityUtil.java
Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityUtil.java
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityUtil.java?rev=1839926&r1=1839925&r2=1839926&view=diff==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityUtil.java (original)
+++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityUtil.java Mon Sep 3 09:33:21 2018
@@ -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());
}
}