Return-Path: X-Original-To: apmail-cxf-issues-archive@www.apache.org Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8E94B11906 for ; Tue, 15 Apr 2014 12:54:49 +0000 (UTC) Received: (qmail 80366 invoked by uid 500); 15 Apr 2014 12:54:38 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 80243 invoked by uid 500); 15 Apr 2014 12:54:33 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 79976 invoked by uid 99); 15 Apr 2014 12:54:19 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Apr 2014 12:54:19 +0000 Date: Tue, 15 Apr 2014 12:54:19 +0000 (UTC) From: "Sergey Beryozkin (JIRA)" To: issues@cxf.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CXF-5688) Problem Parsing FIQL Involving Enums MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CXF-5688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13969505#comment-13969505 ] 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 "enum.conversion.case.sensitive" > Problem Parsing FIQL Involving Enums > ------------------------------------ > > Key: CXF-5688 > URL: https://issues.apache.org/jira/browse/CXF-5688 > 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. > 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)