-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
9
Please run the following test:
import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.SimpleBeanInfo;
import javax.swing.SwingBeanInfoBase;
import javax.swing.AbstractButtonBeanInfo;
public class Test {
public static void main(String[] args) throws IntrospectionException {
BeanInfo i = Introspector.getBeanInfo(SimpleBeanInfo.class);
System.out.println("test: " + i.getMethodDescriptors().length + " descriptors");
}
}
Output:
"test: 18 descriptors"
But if replace "SimpleBeanInfo.class" with "SwingBeanInfoBase.class" or "AbstractButtonBeanInfo.class", it fails:
Exception in thread "main" java.lang.NullPointerException
at javax.swing.SwingBeanInfoBase.getAdditionalBeanInfo(SwingBeanInfoBase.java:70)
at java.beans.Introspector.<init>(Introspector.java:445)
at java.beans.Introspector.getBeanInfo(Introspector.java:204)
at testfs.Test.main(Test.java:14)
Java Result: 1
Is that what expected?
Checked with JDK9 b70, OS - Win 7.
import java.beans.BeanInfo;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.SimpleBeanInfo;
import javax.swing.SwingBeanInfoBase;
import javax.swing.AbstractButtonBeanInfo;
public class Test {
public static void main(String[] args) throws IntrospectionException {
BeanInfo i = Introspector.getBeanInfo(SimpleBeanInfo.class);
System.out.println("test: " + i.getMethodDescriptors().length + " descriptors");
}
}
Output:
"test: 18 descriptors"
But if replace "SimpleBeanInfo.class" with "SwingBeanInfoBase.class" or "AbstractButtonBeanInfo.class", it fails:
Exception in thread "main" java.lang.NullPointerException
at javax.swing.SwingBeanInfoBase.getAdditionalBeanInfo(SwingBeanInfoBase.java:70)
at java.beans.Introspector.<init>(Introspector.java:445)
at java.beans.Introspector.getBeanInfo(Introspector.java:204)
at testfs.Test.main(Test.java:14)
Java Result: 1
Is that what expected?
Checked with JDK9 b70, OS - Win 7.