[ https://issues.apache.org/jira/browse/HARMONY-6038?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12655852#action_12655852
]
Kevin Zhou commented on HARMONY-6038:
-------------------------------------
Patch applied on r725765.
> [classlib] [beans] java.beans.Introspector.getBeanInfo doesn't works well and throws
NPE
> ----------------------------------------------------------------------------------------
>
> Key: HARMONY-6038
> URL: https://issues.apache.org/jira/browse/HARMONY-6038
> Project: Harmony
> Issue Type: Bug
> Components: Classlib
> Affects Versions: 5.0M8
> Reporter: Kevin Zhou
> Fix For: 5.0M9
>
> Attachments: HARMONY-6038.diff
>
> Original Estimate: 24h
> Remaining Estimate: 24h
>
> 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)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
|