You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ad...@apache.org on 2012/05/05 21:45:19 UTC

svn commit: r1334473 - /ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/SetServiceFields.java

Author: adrianc
Date: Sat May  5 19:45:19 2012
New Revision: 1334473

URL: http://svn.apache.org/viewvc?rev=1334473&view=rev
Log:
Reverting my previous commit because it breaks nested expressions.

Modified:
    ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/SetServiceFields.java

Modified: ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/SetServiceFields.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/SetServiceFields.java?rev=1334473&r1=1334472&r2=1334473&view=diff
==============================================================================
--- ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/SetServiceFields.java (original)
+++ ofbiz/trunk/framework/minilang/src/org/ofbiz/minilang/method/callops/SetServiceFields.java Sat May  5 19:45:19 2012
@@ -47,31 +47,12 @@ public final class SetServiceFields exte
 
     // This method is needed only during the v1 to v2 transition
     private static boolean autoCorrect(Element element) {
-        boolean elementModified = false;
         String errorListAttr = element.getAttribute("error-list-name");
         if (!errorListAttr.isEmpty()) {
             element.removeAttribute("error-list-name");
-            elementModified = true;
-        }
-        // Correct map attribute wrapped in ${}
-        String mapAttr = element.getAttribute("map").trim();
-        if (mapAttr.startsWith("${") && mapAttr.endsWith("}")) {
-            mapAttr = mapAttr.substring(2, mapAttr.length() - 1);
-            if (!mapAttr.contains("${")) {
-                element.setAttribute("map", mapAttr);
-                elementModified = true;
-            }
-        }
-        // Correct to-map attribute wrapped in ${}
-        String toMapAttr = element.getAttribute("to-map").trim();
-        if (toMapAttr.startsWith("${") && toMapAttr.endsWith("}")) {
-            toMapAttr = toMapAttr.substring(2, toMapAttr.length() - 1);
-            if (!toMapAttr.contains("${")) {
-                element.setAttribute("to-map", toMapAttr);
-                elementModified = true;
-            }
+            return true;
         }
-        return elementModified;
+        return false;
     }
 
     private final FlexibleMapAccessor<Map<String, ? extends Object>> mapFma;
@@ -84,7 +65,6 @@ public final class SetServiceFields exte
             MiniLangValidate.attributeNames(simpleMethod, element, "service-name", "map", "to-map");
             MiniLangValidate.requiredAttributes(simpleMethod, element, "service-name", "map", "to-map");
             MiniLangValidate.constantPlusExpressionAttributes(simpleMethod, element, "service-name");
-            MiniLangValidate.expressionAttributes(simpleMethod, element, "map", "to-map");
             MiniLangValidate.noChildElements(simpleMethod, element);
         }
         boolean elementModified = autoCorrect(element);