UPDATE: Some improvements with Map iterations (https://issues.apache.org/jira/browse/OFBIZ-4415) A patch from Dimitri Unruh which improves some Map Iterations.

git-svn-id: https://svn.apache.org/repos/asf/ofbiz/trunk@1170525 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sascha Rodekamp
2011-09-14 10:52:01 +00:00
parent 5a0b643c39
commit 16607bb1ac
5 changed files with 21 additions and 15 deletions
@@ -444,8 +444,9 @@ public class CoreEvents {
Map<String, String[]> serviceFieldsToSave = checkMap(request.getParameterMap(), String.class, String[].class);
Map<String, Object> savedFields = FastMap.newInstance();
for (String key: serviceFieldsToSave.keySet()) {
if (null!=serviceFieldsToSave.get(key) && request.getParameter(key).equalsIgnoreCase("on") && !key.equals("_CLEAR_PREVIOUS_PARAMS_")) {
for (Map.Entry<String, String[]> entry : serviceFieldsToSave.entrySet()) {
String key = entry.getKey();
if (entry.getValue() != null && "on".equalsIgnoreCase(request.getParameter(key)) && !"_CLEAR_PREVIOUS_PARAMS_".equals(key)) {
String[] servicePath = key.split("\\|\\|");
String partialKey = servicePath[servicePath.length-1];
savedFields.put(partialKey, getObjectFromServicePath(key ,syncServiceResult));