Author: nmalin
Date: Tue Jan 31 20:06:13 2017
New Revision: 1781161

URL: http://svn.apache.org/viewvc?rev=1781161&view=rev
Log:
Fixed: correct testConvertOperatorSubstitutions failure
This correction has been realized on trunk by adrianc at revision 1684216 after 
the branch 14.12 creation.
The problem came from the HashMap didn't keep the introduce order and the 
pattern match @gt before the @gteq with an unlogical result '>eq' instead of 
'>='
Thanks to the build bot and Jacques for the confirmation

Modified:
    
ofbiz/branches/release14.12/framework/base/src/org/ofbiz/base/util/StringUtil.java

Modified: 
ofbiz/branches/release14.12/framework/base/src/org/ofbiz/base/util/StringUtil.java
URL: 
http://svn.apache.org/viewvc/ofbiz/branches/release14.12/framework/base/src/org/ofbiz/base/util/StringUtil.java?rev=1781161&r1=1781160&r2=1781161&view=diff
==============================================================================
--- 
ofbiz/branches/release14.12/framework/base/src/org/ofbiz/base/util/StringUtil.java
 (original)
+++ 
ofbiz/branches/release14.12/framework/base/src/org/ofbiz/base/util/StringUtil.java
 Tue Jan 31 20:06:13 2017
@@ -24,6 +24,7 @@ import java.net.URLEncoder;
 import java.util.Collection;
 import java.util.HashMap;
 import java.util.Iterator;
+import java.util.LinkedHashMap;
 import java.util.LinkedHashSet;
 import java.util.LinkedList;
 import java.util.List;
@@ -34,6 +35,7 @@ import java.util.regex.Pattern;
 
 import org.apache.commons.codec.DecoderException;
 import org.apache.commons.codec.binary.Hex;
+import org.apache.commons.collections.map.LinkedMap;
 import org.ofbiz.base.lang.Appender;
 
 /**
@@ -48,7 +50,7 @@ public class StringUtil {
     protected static final Map<String, Pattern> substitutionPatternMap;
 
     static {
-        substitutionPatternMap = new HashMap<String, Pattern>();
+        substitutionPatternMap = new LinkedHashMap<String, Pattern>();
         substitutionPatternMap.put("&&", Pattern.compile("@and", 
Pattern.LITERAL));
         substitutionPatternMap.put("||", Pattern.compile("@or", 
Pattern.LITERAL));
         substitutionPatternMap.put("<=", Pattern.compile("@lteq", 
Pattern.LITERAL));


Reply via email to