From 92b56521568f4fc0f3f003a920a2311dedeb63c8 Mon Sep 17 00:00:00 2001 From: Jacopo Cappellato Date: Fri, 7 Apr 2017 08:34:57 +0000 Subject: [PATCH] Improved: cleaned up some old code without altering its functional behavior. git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1790520 13f79535-47bb-0310-9956-ffa450edef68 --- .../entity/cache/AbstractEntityConditionCache.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/cache/AbstractEntityConditionCache.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/cache/AbstractEntityConditionCache.java index 9abade5428..e310eb7e89 100644 --- a/framework/entity/src/main/java/org/apache/ofbiz/entity/cache/AbstractEntityConditionCache.java +++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/cache/AbstractEntityConditionCache.java @@ -157,13 +157,9 @@ public abstract class AbstractEntityConditionCache extends AbstractCache> convert(boolean isPK, String targetEntityName, GenericEntity entity) { + protected List> convert(String targetEntityName, GenericEntity entity) { if (isNull(entity)) return null; - if (isPK) { - return entity.getModelEntity().convertToViewValues(targetEntityName, entity); - } else { - return entity.getModelEntity().convertToViewValues(targetEntityName, entity); - } + return entity.getModelEntity().convertToViewValues(targetEntityName, entity); } public void storeHook(boolean isPK, GenericEntity oldEntity, GenericEntity newEntity) { @@ -177,7 +173,7 @@ public abstract class AbstractEntityConditionCache extends AbstractCache it = model.getViewConvertorsIterator(); while (it.hasNext()) { String targetEntityName = it.next(); - storeHook(targetEntityName, isPK, convert(isPK, targetEntityName, oldEntity), convert(false, targetEntityName, newEntity)); + storeHook(targetEntityName, isPK, convert(targetEntityName, oldEntity), convert(targetEntityName, newEntity)); } }