ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1308394 - /webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/EnumUtil.java
Date Mon, 02 Apr 2012 15:47:29 GMT
Author: dkulp
Date: Mon Apr  2 15:47:29 2012
New Revision: 1308394

URL: http://svn.apache.org/viewvc?rev=1308394&view=rev
Log:
[XMLSCHEMA-22] Use the english locale for parsing enums to avoid issues
with local locals making the toUpperCase call not yield usable results.

Modified:
    webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/EnumUtil.java

Modified: webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/EnumUtil.java
URL: http://svn.apache.org/viewvc/webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/EnumUtil.java?rev=1308394&r1=1308393&r2=1308394&view=diff
==============================================================================
--- webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/EnumUtil.java
(original)
+++ webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/EnumUtil.java
Mon Apr  2 15:47:29 2012
@@ -19,6 +19,8 @@
 
 package org.apache.ws.commons.schema;
 
+import java.util.Locale;
+
 /**
  * 
  */
@@ -28,7 +30,7 @@ final class EnumUtil {
     }
     
     static <T extends Enum<T>> T valueOf(Class<T> enumClass, String name)
{
-        return Enum.valueOf(enumClass, name.toUpperCase());
+        return Enum.valueOf(enumClass, name.toUpperCase(Locale.ENGLISH));
     }
 
 }



Mime
View raw message