dev@glassfish.java.net

Code inspection of Class.getMethods() and Class.getDeclaredMethods() usage

From: Joe Di Pol <joe.dipol_at_oracle.com>
Date: Mon, 27 Feb 2012 16:09:09 -0800

Just a heads up that I'm about to file a batch of Jira tasks requesting
engineers to visually inspect code to find any latent bugs that may be
triggered by the Java 7 behavior change to the Class.getMethods() and
Class.getDeclaredMethods() calls.

We found and fixed a couple of these in 3.1.2, but since the bugs can
be intermittent I'd like us to make a proactive effort to stomp out
any remaining bugs that we may not have hit yet. From what I can tell
we have over 250 calls to these methods in the trunk. Likely the vast
majority of these are fine, but we should double check.

Details on the issue (including how some bugs were fixed) are described
in Tom's excellent document:

https://wikis.oracle.com/display/GlassFish/Method+Ordering+from+Class.getMethods

Call to action:

- If you are assigned a Jira task about this, please read the above
wiki page and perform the code inspection. You may close the task
once the inspection is complete and any problems are fixed (or bugs
filed on things that need to be fixed).

- If you own a component that delivers into GlassFish you won't be
getting a Jira task since I did not search all projects. But please
inspect your code for use of getMethods/getDeclaredMethods. See
Tom's write-up for details.

Thanks!

Joe