[forge-issues] [JBoss JIRA] (ROASTER-33) Accessor of type boolean starting with 'is' are not considered accessor

George Gastaldi (JIRA) issues at jboss.org
Thu Sep 11 13:37:19 EDT 2014


    [ https://issues.jboss.org/browse/ROASTER-33?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13001575#comment-13001575 ] 

George Gastaldi commented on ROASTER-33:
----------------------------------------

Hi [~agoncal], 

I noticed that in your test, the {{myBoolean}} attribute is a {{java.lang.Boolean}}, not a primitive boolean though

> Accessor of type boolean starting with 'is' are not considered accessor
> -----------------------------------------------------------------------
>
>                 Key: ROASTER-33
>                 URL: https://issues.jboss.org/browse/ROASTER-33
>             Project: Roaster
>          Issue Type: Bug
>    Affects Versions: 2.7.1.Final
>            Reporter: Antonio Goncalves
>             Fix For: 2.x Future
>
>         Attachments: IsTest.java
>
>
> If I parse a class with a boolean attribute with {{is/set}} instead of {{get/set}}, the accessor is not recognized. I think it's because of the {{AbstractJavaSourceMemberHolder.extractPropertyName}} method :
> {code}
>    private String extractPropertyName(Method<O, ?> method)
>    {
>       if (method.getName().matches("^[gs]et.+$"))
>       {
>          return Strings.uncapitalize(method.getName().substring(3));
>       }
>       return null;
>    }
> {code}
> I'm attaching a test case that reproduces it if you want



--
This message was sent by Atlassian JIRA
(v6.3.1#6329)


More information about the forge-issues mailing list