velocity-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cbris...@apache.org
Subject svn commit: r1780305 - in /velocity/engine/trunk/velocity-engine-core/src: main/java/org/apache/velocity/util/ExtProperties.java test/java/org/apache/velocity/test/BaseTestCase.java test/java/org/apache/velocity/test/eventhandler/Handler1.java
Date Thu, 26 Jan 2017 01:35:14 GMT
Author: cbrisson
Date: Thu Jan 26 01:35:14 2017
New Revision: 1780305

URL: http://svn.apache.org/viewvc?rev=1780305&view=rev
Log:
[engine] fix toLowerCase without Locale.ROOT

Modified:
    velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java
    velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/BaseTestCase.java
    velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/eventhandler/Handler1.java

Modified: velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java?rev=1780305&r1=1780304&r2=1780305&view=diff
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java
(original)
+++ velocity/engine/trunk/velocity-engine-core/src/main/java/org/apache/velocity/util/ExtProperties.java
Thu Jan 26 01:35:14 2017
@@ -1224,7 +1224,7 @@ public class ExtProperties extends Hasht
      * text maps to a boolean value, or <code>null</code> otherwise.
      */
     public String testBoolean(String value) {
-        String s = value.toLowerCase();
+        String s = value.toLowerCase(Locale.ROOT);
 
         if (s.equals("true") || s.equals("on") || s.equals("yes")) {
             return "true";

Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/BaseTestCase.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/BaseTestCase.java?rev=1780305&r1=1780304&r2=1780305&view=diff
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/BaseTestCase.java
(original)
+++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/BaseTestCase.java
Thu Jan 26 01:35:14 2017
@@ -538,7 +538,7 @@ public abstract class BaseTestCase exten
     {
         StringBuffer name = new StringBuffer();
         name.append(Character.toTitleCase(s.charAt(0)));
-        name.append(s.substring(1, s.length()).toLowerCase());
+        name.append(s.substring(1, s.length()).toLowerCase(Locale.ROOT));
         return name.toString();
     }
 }

Modified: velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/eventhandler/Handler1.java
URL: http://svn.apache.org/viewvc/velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/eventhandler/Handler1.java?rev=1780305&r1=1780304&r2=1780305&view=diff
==============================================================================
--- velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/eventhandler/Handler1.java
(original)
+++ velocity/engine/trunk/velocity-engine-core/src/test/java/org/apache/velocity/test/eventhandler/Handler1.java
Thu Jan 26 01:35:14 2017
@@ -42,7 +42,7 @@ public class Handler1
             if (value == null)
                 return null;
             else
-                return value.toString().toUpperCase() + value.toString().toLowerCase();
+                return value.toString().toUpperCase() + value.toString().toLowerCase(Locale.ROOT);
         }
 
         /**



Mime
View raw message