You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Marco Benuzzi (JIRA)" <ji...@apache.org> on 2011/02/25 00:06:38 UTC
[jira] Created: (BEANUTILS-388) WrapDynaBean should handle Boolean
property with is...() getter
WrapDynaBean should handle Boolean property with is...() getter
---------------------------------------------------------------
Key: BEANUTILS-388
URL: https://issues.apache.org/jira/browse/BEANUTILS-388
Project: Commons BeanUtils
Issue Type: Bug
Affects Versions: 1.8.3
Environment: Linux 2.6.35.11-83.fc14.i686.PAE
Reporter: Marco Benuzzi
Stub generated from wsdl by wsimport (ant task com.sun.tools.ws.ant.WsImport) have some properties defined with Boolean class and getter method is...() instead of get...().
Using WrapDynaBean to inspect classes which contain those Boolean give NoSuchMethodException.
Below a test code which show the problem with property "c"
In my opinion this code should work.
public class Custom {
public static class Test {
private Integer a;
private Boolean b;
private Boolean c;
public Integer getA() {
return a;
}
public void setA(Integer a) {
this.a = a;
}
public Boolean getB() {
return b;
}
public void setB(Boolean b) {
this.b = b;
}
public Boolean isC() {
return c;
}
public void setC(Boolean c) {
this.c = c;
}
}
public static void main(String[] args) {
try {
Test object = new Test();
object.setA(100);
object.setB(true);
DynaBean dynaBean = new WrapDynaBean(object);
for (DynaProperty propDesc : dynaBean.getDynaClass().getDynaProperties()) {
System.out.println("name = " + propDesc.getName());
System.out.println("class = " + propDesc.getType().getName());
System.out.println("value = " + dynaBean.get(propDesc.getName()));
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Resolved: (BEANUTILS-388) WrapDynaBean should handle Boolean
property with is...() getter
Posted by "Niall Pemberton (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/BEANUTILS-388?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Niall Pemberton resolved BEANUTILS-388.
---------------------------------------
Resolution: Duplicate
Duplicates BEANUTILS-321, BEANUTILS-356, BEANUTILS-364
> WrapDynaBean should handle Boolean property with is...() getter
> ---------------------------------------------------------------
>
> Key: BEANUTILS-388
> URL: https://issues.apache.org/jira/browse/BEANUTILS-388
> Project: Commons BeanUtils
> Issue Type: Bug
> Affects Versions: 1.8.3
> Environment: Linux 2.6.35.11-83.fc14.i686.PAE
> Reporter: Marco Benuzzi
>
> Stub generated from wsdl by wsimport (ant task com.sun.tools.ws.ant.WsImport) have some properties defined with Boolean class and getter method is...() instead of get...().
> Using WrapDynaBean to inspect classes which contain those Boolean give NoSuchMethodException.
> Below a test code which show the problem with property "c"
> In my opinion this code should work.
> {noformat}
> public class Custom {
>
> public static class Test {
> private Integer a;
> private Boolean b;
> private Boolean c;
> public Integer getA() {
> return a;
> }
> public void setA(Integer a) {
> this.a = a;
> }
> public Boolean getB() {
> return b;
> }
> public void setB(Boolean b) {
> this.b = b;
> }
> public Boolean isC() {
> return c;
> }
> public void setC(Boolean c) {
> this.c = c;
> }
>
> }
>
> public static void main(String[] args) {
> try {
> Test object = new Test();
> object.setA(100);
> object.setB(true);
> DynaBean dynaBean = new WrapDynaBean(object);
> for (DynaProperty propDesc : dynaBean.getDynaClass().getDynaProperties()) {
> System.out.println("name = " + propDesc.getName());
> System.out.println("class = " + propDesc.getType().getName());
> System.out.println("value = " + dynaBean.get(propDesc.getName()));
> }
> } catch (Exception e) {
> e.printStackTrace();
> }
> }
> }
> {noformat}
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira