CC to Hannes Wallnoefer
OS: Linux → All
Hardware: PC → All
Created attachment 128947 [details] [diff] [review] Fix: allow to reflect package-private classes in JavaMembers.lookupClass The reason for the regression is that now JavaMembers.lookupClass never attempts to reflect package-private classes. But this is wrong since even with SecirutyManager installed JVM allows to call Class.getMethos()( and returns list of all public methods in the class and its super classes. The patch removes the restrictions while making JavaMembers.lookupClass much simpler.
Yep, patch works well for me!
I committed the patch.
Status: NEW → RESOLVED
Last Resolved: 16 years ago
Resolution: --- → FIXED
Now with the patch committed Rhino shell prints TEST2 for print(Packages.X.test().str2()) if access permissions allows access to public methods of package-private classes and when not it prints: js: "<command>", line 1: While attempting to call "str2" in class "MyTest" receieved java.lang.IllegalAccessException which is expected.
Marking Verified per Comment #4
Status: RESOLVED → VERIFIED
Targeting as resolved against 1.5R5
Target Milestone: --- → 1.5R5
You need to log in before you can comment on or make changes to this bug.