[
https://issues.jboss.org/browse/ROASTER-33?page=com.atlassian.jira.plugin...
]
Antonio Goncalves updated ROASTER-33:
-------------------------------------
Description:
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
was:
If I parse a class with a boolean attribute with is/set instead of get/set, the accessor
is not recognizes. 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
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)