You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexei Zakharov (JIRA)" <ji...@apache.org> on 2007/09/28 18:17:50 UTC
[jira] Resolved: (HARMONY-4861) [classlib][beans]
PropertyDescriptor.getReadMethod() violates spec
[ https://issues.apache.org/jira/browse/HARMONY-4861?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alexei Zakharov resolved HARMONY-4861.
--------------------------------------
Resolution: Fixed
The patch was applied at the revision 580401. Thanks Andrey, please verify.
> [classlib][beans] PropertyDescriptor.getReadMethod() violates spec
> ------------------------------------------------------------------
>
> Key: HARMONY-4861
> URL: https://issues.apache.org/jira/browse/HARMONY-4861
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Reporter: Andrey Pavlenko
> Assignee: Alexei Zakharov
> Attachments: HARMONY-4861-IntrospectorTest.patch, HARMONY-4861-StandardBeanInfo.patch
>
>
> According to JavaBeans API specification v1.01 ยง8.3.2 introspector should use "is" methods for reading boolean properties prior to "get".
> The following test demonstrates the issue:
> import java.beans.IntrospectionException;
> import java.beans.Introspector;
> import java.beans.PropertyDescriptor;
> public class Test {
> public static class TestBean {
> boolean prop1;
> public boolean isProp1() {
> return prop1;
> }
> public boolean getProp1() {
> return prop1;
> }
> }
> public static void main(String[] args) throws IntrospectionException {
> PropertyDescriptor[] propertyDescriptors = Introspector.getBeanInfo(
> TestBean.class).getPropertyDescriptors();
> for (PropertyDescriptor d : propertyDescriptors) {
> if (d.getName().equals("prop1")
> && (!d.getReadMethod().getName().equals("isProp1"))) {
> System.err.println("FAILED");
> return;
> }
> }
> System.err.println("PASSED");
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.