[
https://issues.apache.org/jira/browse/CXF-5688?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sergey Beryozkin updated CXF-5688:
----------------------------------
Component/s: JAX-RS
Priority: Minor (was: Critical)
Assignee: Sergey Beryozkin
> Problem Parsing FIQL Involving Enums
> ------------------------------------
>
> Key: CXF-5688
> URL: https://issues.apache.org/jira/browse/CXF-5688
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Reporter: Azitabh
> Assignee: Sergey Beryozkin
> Priority: Minor
>
> FIQL parser assumes that enums would be defined in all caps.
> In case Enums are not defined in all caps,
> InjectionUtils.convertStringToPrimitive(String value, Class<?> cls) raises
> PropertyNotFoundException because it's converting the user provided enum
> value to caps and calling ENUM.valueOf(UPPERCASE_STR).
> ethod m = cls.getMethod("valueOf", new Class[]{String.class});
> return m.invoke(null, value.toUpperCase());
> Since JAVA doesn't enforce enums to be all caps, I don't see any reason why
> FIQLParser should assume this.
> https://github.com/apache/cxf/blob/master/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/InjectionUtils.java
>
--
This message was sent by Atlassian JIRA
(v6.2#6252)