Details
Description
JavaClass created from a binary java.lang.Class rather than the source does not provide access to non public methods, fields, or constructors, whereas the JavaClass created from the source does.
I have attached a patch that provides test cases and fixes for this situation. It also adds a test to highlight the inconsistency between source and binary due to the lack of default constructor in the former and inability to differentiate it from a normal public no arg constructor in the latter.
Basically the fix is to use clazz.getDeclaredMethods() instead of clazz.getMethods() which also removes the need for excluding inherited methods as getDeclaredMethods() does not return inherited methods. Similar fixes are required for fields and constructors.
The supplied patch was created against the trunk but can also be applied to QDOX_1_6_3.
Is there any chance that this can be applied to 1.6.3 to create 1.6.4 as it is a blocker for me.
Activity
Field | Original Value | New Value |
---|---|---|
Fix Version/s | 1.6 [ 10814 ] |
Assignee | Paul Hammant [ paul ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Resolution | Fixed [ 1 ] |
fixed. thanks for patch