bode...@apache.org wrote:
if user input is compared to fixed strings in a case insensitive manner we 
should use the default locale.  Use Locale.ENGLISH consistently

Perhaps I'm not understanding the point of this.

URL: 
http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/Project.java?rev=910955&r1=910954&r2=910955&view=diff
     public static boolean toBoolean(String s) {
-        return ("on".equalsIgnoreCase(s)
-                || "true".equalsIgnoreCase(s)
-                || "yes".equalsIgnoreCase(s));
+        String lc = s == null ? null : s.toLowerCase(Locale.ENGLISH);
+        return ("on".equals(lc)
+                || "true".equals(lc)
+                || "yes".equals(lc));

This should result in exactly the same behavior, except slower. So... why?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@ant.apache.org
For additional commands, e-mail: dev-h...@ant.apache.org

Reply via email to