Issue Details (XML | Word | Printable)

Key: GLASSFISH-18427
Type: Task Task
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: jwells
Reporter: Joe Di Pol
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.

Weld: Inspect JDK 7 getMethods()/getDeclaredMethods() usage

Created: 28/Feb/12 05:24 PM   Updated: 25/Mar/13 02:23 PM   Resolved: 25/Mar/13 02:23 PM
Component/s: cdi
Affects Version/s: 4.0_b25
Fix Version/s: 4.0

Time Tracking:
Not Specified

Participants: Joe Di Pol, jwells and Sivakumar Thyagarajan

 Description  « Hide

Recent JDK 7 releases have altered the order of methods returned by the
Class.getMethods() and Class.getDeclaredMethods() calls. The order is
no longer stable and can change from one JVM run to the next.

This caused a number of sporadic bugs to appear during 3.1.2 development
when running with JDK 7. Those have been fixed, but further inspection
of the source has found a number of cases where we use getMethods() and

Each of these cases should be visually inspected to see if the code is
making any assumptions on the order of methods returned by get*Methods().
In particular it should handle the case of multiple methods having the
same name.

For more details on what to look for and how to fix it see this document:

Please inspect the following files for their use of getMethods() /
getDeclaredMethods() to ensure the code is not making any assumptions
with respect to the order of methods returned. Create bugs for
any issues that need to be fixed and link them to this task. Once you
have completed inspection update this task with status and close it.

Weld integration for glassfish

jjsnyder83 made changes - 19/Oct/12 01:36 PM
Field Original Value New Value
Fix Version/s 4.0 [ 10970 ]
Sivakumar Thyagarajan added a comment - 10/Dec/12 05:26 AM

Transferring to JJ Snyder

Sivakumar Thyagarajan made changes - 10/Dec/12 05:26 AM
Assignee Sivakumar Thyagarajan [ sivakumart ] jjsnyder83 [ jjsnyder83 ]
jwells made changes - 20/Mar/13 07:58 PM
Assignee jjsnyder83 [ jjsnyder83 ] jwells [ jwells ]
jwells added a comment - 25/Mar/13 02:23 PM looks safe (no usages) looks safe (iterating through all doing the same to each one) Looks ok, but will return a different valid JSON string. Should probably be ok, as long as the string is not used for equality or something like that. I checked the only place using the javaToJSON method and it looks ok

jwells made changes - 25/Mar/13 02:23 PM
Status Open [ 1 ] Closed [ 6 ]
Resolution Fixed [ 1 ]