cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <>
Subject [jira] [Commented] (CXF-5688) Problem Parsing FIQL Involving Enums
Date Tue, 15 Apr 2014 12:54:19 GMT


Sergey Beryozkin commented on CXF-5688:

Well, the case where we have enum with say "GOOD" and "PERFECT" values and a query like "status=good"
is more realistic to deal with; having a "Good" enum value and thus expecting the query contain
a strictly case sensitive value such as "status=Good" is a bit more brittle in case of enums
unless the client side is controlled. However I can imagine where the existing enums which
can not be modified may need to be supported, as such a contextual property can be introduced
to support this edge case. The property name is ""

> Problem Parsing FIQL Involving Enums
> ------------------------------------
>                 Key: CXF-5688
>                 URL:
>             Project: CXF
>          Issue Type: Bug
>            Reporter: Azitabh
>            Priority: Critical
> 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.

This message was sent by Atlassian JIRA

View raw message