Community
Participate
Working Groups
Assuming the following scenario: class Foo { private UnknownType unusedField; private String usedField; } The class foo is contained in a referenced bundle while the UnknownType is not available. As the field is never read, there won't be any problems at runtime. However, the class-loader based implementation will call type.getDeclaredFields which in turn will throw an undocumented NoClassDefFoundError. As there is no way to query the declared fields individually, there won't be any information about any field of Foo available, if the NoClassDefFoundError were caught. I'm currently not aware of a robust strategy that provides a lot information about the types and still does not crash on an incomplete class-path.