[ 
https://issues.apache.org/jira/browse/CXF-5688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14161782#comment-14161782
 ] 

Azitabh commented on CXF-5688:
------------------------------

[~sergey_beryozkin]: I agree with you on the first point that 
ENUM_CONVERSION_CASE_SENSITIVE should not be needed to be set explicitly to 
true in order to ensure case conversion. This in fact would break backward 
compatibility.

However, I don't think we should do a try-catch thing here. JAVA gives freedom 
of defining "Test" and "TEST" as separate values for the same ENUM. Though 
doing so doesn't make much sense, we shouldn't take that freedom away.

Leaving the code as it is seems to be the best option.

> 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
>             Fix For: 3.0.0, 2.7.12
>
>
> 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.3.4#6332)

Reply via email to