harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Zhou (JIRA)" <j...@apache.org>
Subject [jira] Created: (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 09:30:30 GMT
[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
             Fix For: 5.0M10


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