Bug 1009248 - Cannot access public methods of private inner classes via reflection
Cannot access public methods of private inner classes via reflection
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: java-1.6.0-openjdk (Show other bugs)
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Andrew Haley
BaseOS QE - Apps
Depends On:
  Show dependency treegraph
Reported: 2013-09-18 00:49 EDT by James Livingston
Modified: 2016-02-21 19:56 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-09-29 07:30:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Sun Bug Database 4071957 None None None Never
Red Hat Knowledge Base (Solution) 486423 None None None Never

  None (edit)
Description James Livingston 2013-09-18 00:49:39 EDT
This is an existing bug reported in the Sun/Oracle bug tracker http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4071957, opened over 16 years ago.

If a method on a class returns an instance of a private inner class, public methods on it cannot be accessed via reflection. This can impact the evaluation of JSPs if a servlet/filter adds a parameter which is returned from HashMap.values() or similar.

To reproduce the error, run:
  public static void main(String argv[]) throws Exception {
    Set keys = new HashMap().keySet();
    Method method = keys.getClass().getMethod("iterator");

An update on the bug in 2005 suggests it is now possible to implement a fix using data available since JDK 5.
Comment 2 Deepak Bhole 2013-09-18 15:38:57 EDT
Assigning to Andrew Haley to take an initial look with regards to feasibility (since there may be security concerns).

Andrew, any issues with us fixing this issue? If not, I can assign it to one of the engineers.
Comment 3 RHEL Product and Program Management 2013-10-13 19:09:38 EDT
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated
in the current release, Red Hat is unable to address this
request at this time.

Red Hat invites you to ask your support representative to
propose this request, if appropriate, in the next release of
Red Hat Enterprise Linux.

Note You need to log in before you can comment on or make changes to this bug.