Issue Details (XML | Word | Printable)

Key: HARMONY-6038
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Kevin Zhou
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Harmony

[classlib] [beans] java.beans.Introspector.getBeanInfo doesn't works well and throws NPE

Created: 09/Dec/08 02:51 PM   Updated: 12/Dec/08 01:51 AM
Return to search
Component/s: Classlib
Affects Version/s: 5.0M8
Fix Version/s: 5.0M9

Time Tracking:
Original Estimate: 24h
Original Estimate - 24h
Remaining Estimate: 24h
Remaining Estimate - 24h
Time Spent: Not Specified
Remaining Estimate - 24h

File Attachments:
  Size
File Licensed for inclusion in ASF works HARMONY-6038.diff 2008-12-10 02:46 AM Kevin Zhou 4 kB

Estimated Complexity: Moderate
Resolution Date: 12/Dec/08 01:51 AM


 Description  « Hide
Conduct the given a test case [1] below on RI and HARMONY.
RI works well, while HARMONY will throw a NullPointerException [2].
The exception is throw in StandardBeanInfo during the merging of properties from MockParent ang MockChild classes.

[1] Test Case
public class IntrospectorTest extends TestCase {
    public static class MockParent {
        public void setValue(int v) {
            // do nothing
        }
        public void setValue(int v, String s) {
            // do nothing
        }
    }
    public static class MockChild extends MockParent {
        public void setValue(int v) {
            // do nothing
        }
    }
    public void test_Introspector() throws Exception {
        BeanInfo beanInfo = Introspector.getBeanInfo(MockChild.class);
    }
}
[2] NPE Stack Trace:
java.lang.NullPointerException
at java.beans.StandardBeanInfo.mergeProps(StandardBeanInfo.java:295)
at java.beans.StandardBeanInfo.mergeBeanInfo(StandardBeanInfo.java:209)
at java.beans.Introspector.getBeanInfoImpl(Introspector.java:282)
at java.beans.Introspector.getBeanInfoImplAndInit(Introspector.java:347)
at java.beans.Introspector.getBeanInfo(Introspector.java:162)
at IntrospectorTest.test_MockObject(IntrospectorTest.java:27)

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Kevin Zhou added a comment - 09/Dec/08 03:34 PM
Would you please help to review this patch?

Kevin Zhou added a comment - 12/Dec/08 01:50 AM
Patch applied on r725765.