You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ws.apache.org by "Daniel Kulp (Created) (JIRA)" <ji...@apache.org> on 2012/03/22 22:06:22 UTC
[jira] [Created] (XMLSCHEMA-22) enum parsing is locale specific
enum parsing is locale specific
-------------------------------
Key: XMLSCHEMA-22
URL: https://issues.apache.org/jira/browse/XMLSCHEMA-22
Project: XmlSchema
Issue Type: Bug
Affects Versions: XmlSchema 2.0
Reporter: Daniel Kulp
The EnumUtils class used to parse the enums does:
{code}
static <T extends Enum<T>> T valueOf(Class<T> enumClass, String name) {
return Enum.valueOf(enumClass, name.toUpperCase());
}
{code}
but the toUpperCase call there is locale specific and could result in not being able to parse the enums.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Commented] (XMLSCHEMA-22) enum parsing is locale specific
Posted by "Hudson (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-22?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13244315#comment-13244315 ]
Hudson commented on XMLSCHEMA-22:
---------------------------------
Integrated in xmlschema-trunk-jdk15 #20 (See [https://builds.apache.org/job/xmlschema-trunk-jdk15/20/])
[XMLSCHEMA-22] Use the english locale for parsing enums to avoid issues
with local locals making the toUpperCase call not yield usable results. (Revision 1308394)
Result = SUCCESS
dkulp :
Files :
* /webservices/xmlschema/trunk/xmlschema-core/src/main/java/org/apache/ws/commons/schema/EnumUtil.java
> enum parsing is locale specific
> -------------------------------
>
> Key: XMLSCHEMA-22
> URL: https://issues.apache.org/jira/browse/XMLSCHEMA-22
> Project: XmlSchema
> Issue Type: Bug
> Affects Versions: XmlSchema 2.0
> Reporter: Daniel Kulp
> Assignee: Daniel Kulp
> Fix For: 2.0.2
>
>
> The EnumUtils class used to parse the enums does:
> {code}
> static <T extends Enum<T>> T valueOf(Class<T> enumClass, String name) {
> return Enum.valueOf(enumClass, name.toUpperCase());
> }
> {code}
> but the toUpperCase call there is locale specific and could result in not being able to parse the enums.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Commented] (XMLSCHEMA-22) enum parsing is locale specific
Posted by "Ali (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-22?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13237555#comment-13237555 ]
Ali commented on XMLSCHEMA-22:
------------------------------
I included following modified version of EnumUtil in my project, and it solved the error "java.lang.IllegalArgumentException: No enum const class org.apache.ws.commons.schema.XmlSchemaForm.QUALİFİED". Until the issue is fixed, this is the workaround for me..
---
package org.apache.ws.commons.schema;
import java.util.Locale;
/**
* @author Ali Pakkan
*
*/
public class EnumUtil {
private EnumUtil() {
}
static <T extends Enum<T>> T valueOf(Class<T> enumClass, String name) {
return Enum.valueOf(enumClass, name.toUpperCase(Locale.ENGLISH));
}
}
> enum parsing is locale specific
> -------------------------------
>
> Key: XMLSCHEMA-22
> URL: https://issues.apache.org/jira/browse/XMLSCHEMA-22
> Project: XmlSchema
> Issue Type: Bug
> Affects Versions: XmlSchema 2.0
> Reporter: Daniel Kulp
>
> The EnumUtils class used to parse the enums does:
> {code}
> static <T extends Enum<T>> T valueOf(Class<T> enumClass, String name) {
> return Enum.valueOf(enumClass, name.toUpperCase());
> }
> {code}
> but the toUpperCase call there is locale specific and could result in not being able to parse the enums.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Resolved] (XMLSCHEMA-22) enum parsing is locale specific
Posted by "Daniel Kulp (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-22?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kulp resolved XMLSCHEMA-22.
----------------------------------
Resolution: Fixed
Fix Version/s: 2.0.2
> enum parsing is locale specific
> -------------------------------
>
> Key: XMLSCHEMA-22
> URL: https://issues.apache.org/jira/browse/XMLSCHEMA-22
> Project: XmlSchema
> Issue Type: Bug
> Affects Versions: XmlSchema 2.0
> Reporter: Daniel Kulp
> Assignee: Daniel Kulp
> Fix For: 2.0.2
>
>
> The EnumUtils class used to parse the enums does:
> {code}
> static <T extends Enum<T>> T valueOf(Class<T> enumClass, String name) {
> return Enum.valueOf(enumClass, name.toUpperCase());
> }
> {code}
> but the toUpperCase call there is locale specific and could result in not being able to parse the enums.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org
[jira] [Assigned] (XMLSCHEMA-22) enum parsing is locale specific
Posted by "Daniel Kulp (Assigned) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/XMLSCHEMA-22?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Daniel Kulp reassigned XMLSCHEMA-22:
------------------------------------
Assignee: Daniel Kulp
> enum parsing is locale specific
> -------------------------------
>
> Key: XMLSCHEMA-22
> URL: https://issues.apache.org/jira/browse/XMLSCHEMA-22
> Project: XmlSchema
> Issue Type: Bug
> Affects Versions: XmlSchema 2.0
> Reporter: Daniel Kulp
> Assignee: Daniel Kulp
>
> The EnumUtils class used to parse the enums does:
> {code}
> static <T extends Enum<T>> T valueOf(Class<T> enumClass, String name) {
> return Enum.valueOf(enumClass, name.toUpperCase());
> }
> {code}
> but the toUpperCase call there is locale specific and could result in not being able to parse the enums.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org