Author: mthl
Date: Thu Jun 27 19:36:37 2019 New Revision: 1862248 URL: http://svn.apache.org/viewvc?rev=1862248&view=rev Log: Improved: Make private methods static when possible (OFBIZ-10966) Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityJsonReader.java Modified: ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityJsonReader.java URL: http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityJsonReader.java?rev=1862248&r1=1862247&r2=1862248&view=diff ============================================================================== --- ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityJsonReader.java (original) +++ ofbiz/ofbiz-framework/trunk/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityJsonReader.java Thu Jun 27 19:36:37 2019 @@ -197,7 +197,7 @@ public class EntityJsonReader { return this.numberRead; } - private List<Map<String, Object>> iterateJsonEntityData(Object jsonData) { + private static List<Map<String, Object>> iterateJsonEntityData(Object jsonData) { List<Map<String, Object>> genericMapList = new LinkedList<Map<String, Object>>(); if (jsonData instanceof JSONArray) { JSONArray jsonArray = (JSONArray) jsonData; @@ -219,7 +219,7 @@ public class EntityJsonReader { return genericMapList; } - private Map<String, Object> iterateJSONObject(JSONObject jsonObj) { + private static Map<String, Object> iterateJSONObject(JSONObject jsonObj) { Map<String, Object> mapObj = new HashMap<String, Object>(); Iterator iterator = jsonObj.keySet().iterator(); while (iterator.hasNext()) { @@ -241,7 +241,7 @@ public class EntityJsonReader { String key = iterator.next().toString(); Object value = jsonObject.get(key); if (UtilValidate.isNotEmpty(value)) { - List<Map<String, Object>> genericMapList = this.iterateJsonEntityData(value); + List<Map<String, Object>> genericMapList = iterateJsonEntityData(value); for (Map<String, Object> keyValPair : genericMapList) { try { ModelEntity modelEntity = this.delegator.getModelEntity(key); @@ -287,7 +287,7 @@ public class EntityJsonReader { String key = iterator.next().toString(); Object value = jsonObject.get(key); if (UtilValidate.isNotEmpty(value)) { - List<Map<String, Object>> genericMapList = this.iterateJsonEntityData(value); + List<Map<String, Object>> genericMapList = iterateJsonEntityData(value); for (Map<String, Object> keyValPair : genericMapList) { try { GenericValue currentValue = delegator.makeValue(key); @@ -372,7 +372,7 @@ public class EntityJsonReader { String key = iterator.next().toString(); Object value = jsonObject.get(key); if (UtilValidate.isNotEmpty(value)) { - List<Map<String, Object>> genericMapList = this.iterateJsonEntityData(value); + List<Map<String, Object>> genericMapList = iterateJsonEntityData(value); for (Map<String, Object> keyValPair : genericMapList) { try { GenericValue currentValue = this.delegator.makeValue(key); @@ -478,7 +478,7 @@ public class EntityJsonReader { String key = iterator.next().toString(); Object value = jsonObject.get(key); if (UtilValidate.isNotEmpty(value)) { - List<Map<String, Object>> genericMapList = this.iterateJsonEntityData(value); + List<Map<String, Object>> genericMapList = iterateJsonEntityData(value); for (Map<String, Object> keyValPair : genericMapList) { try { ModelEntity modelEntity = this.delegator.getModelEntity(key); |
Free forum by Nabble | Edit this page |