cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CXF-4153) FIQL Parsers Beanspector, replaces "is", "set" and "get" in method names
Date Fri, 02 Mar 2012 16:07:59 GMT

     [ https://issues.apache.org/jira/browse/CXF-4153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sergey Beryozkin resolved CXF-4153.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3
                   2.6
                   2.4.7
         Assignee: Sergey Beryozkin

Hi Stefan, I applied your patch, thanks 
                
> FIQL Parsers Beanspector, replaces "is", "set" and "get" in method names
> ------------------------------------------------------------------------
>
>                 Key: CXF-4153
>                 URL: https://issues.apache.org/jira/browse/CXF-4153
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.5.2
>         Environment: Java6
>            Reporter: Stefan Nawrath
>            Assignee: Sergey Beryozkin
>            Priority: Critical
>              Labels: fiql
>             Fix For: 2.4.7, 2.5.3, 2.6, 2.3
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> I try to use FIQL for search. When I init a new Parser, it caches all getters and setters
of the target resource type class via Beanspector. All method names are updated to lower case
and a possible leading "is", "get" or "set" should be replaced.
> -> The replacement effectes not only leading strings! "isPromissed" will be changed
in "promsed"!
> (see code, Beanspector:183)
> private String setterName(Method m) {
>    return m.getName().replace("is", "").replace("set", "").toLowerCase();
> }
> Please change this method in a implementation, like this:
>     private String methodName(Method m) {
>         String result = m.getName().toLowerCase();
>         if (result.startsWith("is")) {
>             result = result.substring(2, result.length());
>         }
>         else if (result.startsWith("set") || result.startsWith("get")) {
>             result = result.substring(3, result.length());
>         }
>         return result;
>     }
> Thanks,
> Stefan

--
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

        

Mime
View raw message