harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Ellison (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-6177) [classlib][beans] java.beans.PropertyDescriptor(String propertyName, Class<?> beanClass, String getterName, String setterName) sets the wrong write method
Date Fri, 24 Apr 2009 13:39:31 GMT

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

Tim Ellison resolved HARMONY-6177.
----------------------------------

    Resolution: Fixed

Thanks Kevin.

Patch applied to BEANS module at repo revision r768309.

Please check it was applied as you expected.


> [classlib][beans] java.beans.PropertyDescriptor(String propertyName, Class<?> beanClass,
String getterName, String setterName) sets the wrong write method
> ----------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-6177
>                 URL: https://issues.apache.org/jira/browse/HARMONY-6177
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>    Affects Versions: 5.0M9
>            Reporter: Kevin Zhou
>            Assignee: Tim Ellison
>             Fix For: 5.0M10
>
>         Attachments: HARMONY-6177.diff
>
>   Original Estimate: 48h
>  Remaining Estimate: 48h
>
> Given a test case [1], RI passes it while HY fails.
> The MockJSplitPane class extends javax.swing.JSplitPane and overwrite its setDividerLocation(int)
method.
> The test case creates a java.beans.PropertyDescriptor object using "dividerLocation"
propertyName, null read method, and "setDividerLocation" write method.
> Then, RI returns the correct method:
> "public void PropertyDescriptorTest$MockJSplitPane.setDividerLocation(int)"
> but HY returns a homony method but from its super class:
> "public void javax.swing.JSplitPane.setDividerLocation(double)"
> [1] Test Case:
> class MockJSplitPane extends javax.swing.JSplitPane {
> private static final long serialVersionUID = 3109235561744543400L;
> public void setDividerLocation(int dividerLocation) { super.setDividerLocation(dividerLocation);
}
> }
> public void test_setWriteMethod_MockJSplitPane() throws Exception {
> Class<?> beanClass = MockJSplitPane.class;
> String propertyName = "dividerLocation";
> String setterName = "setDividerLocation";
> PropertyDescriptor pd = new PropertyDescriptor(propertyName, beanClass, null, setterName);
> assertEquals(propertyName, pd.getName());
> assertNull(pd.getReadMethod());
> Method expectedMethod = beanClass.getMethod(setterName, new Class[] { int.class });
> assertEquals(expectedMethod, pd.getWriteMethod());
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message