This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Perhaps this is a flaw in the standard Introspector, but it might be worth working around even if it is. Create a BeanNode for some private class that extends a public class and overrides/implements the public methods with its own implementation. E.g.: public abstract class Public { public abstract int getFoo (); private static class Private extends Public { public int getFoo () { return 5; } } public static Public getImpl () { return new Private (); } } Now create a new BeanNode (Public.getImpl ()). It will have a "foo" property; however, this property cannot be read, since the introspector makes a PropertyDescriptor referring to Private.getFoo, whic h when invoked throws an IllegalAccessError. The workaround would be to check all methods supplied in the property descriptors to make sure they are declared in a public class. If not, look for a public superclass that has the same method signat ure and use that instead. If there is no such public declaration, discard the property. The methods are virtual, of course, so this is harmless. An easier alternative would be to make BeanNode accept a Class argument specifying the (public) declared class to run introspection on, which the instance object must be assignable to. This might miss some properties that the actual instance had, if there were one or more public classes which were subclasses of the declared class but superclasses of the actual implementation class. Easier still, just run introspection on the lowest public class found in the superclass chain of the object. There, I like that better.
Resolved for 3.4.x or earlier, no new info since then -> verify.
Resolved for 3.4.x or earlier, no new info since then -> closing.