[GLASSFISH-18428] Verifier: Inspect JDK 7 getMethods()/getDeclaredMethods() usage Created: 28/Feb/12  Updated: 28/Feb/12

Status: Open
Project: glassfish
Component/s: verifier
Affects Version/s: 4.0_b25
Fix Version/s: None

Type: Task Priority: Major
Reporter: Joe Di Pol Assignee: Sanjeeb Sahoo
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

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
getDeclaredMethods().

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:

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

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.

Verifier implementation module
    BusinessInterfaceException.java
    BusinessMethodException.java
    BusinessMethodExceptionCheck.java
    BusinessMethodFinal.java
    BusinessMethodMatchesWithDD.java
    BusinessMethodName.java
    BusinessMethodPublic.java
    BusinessMethodRmiIIOPArgs.java
    BusinessMethodRmiIIOPReturn.java
    BusinessMethodStatic.java
    ConnectionFactoryGetConnection.java
    ContainerTransactionStyle3.java
    EJBCreatePostConstruct.java
    EjbCreateMatchesCreate.java
    EjbCreateMatchesCreate.java
    EndPointImplBeanClassChecker.java
    HomeInterfaceFindMethodMatch.java
    HomeMethodException.java
    HomeMethodRmiIIOPArgs.java
    HomeMethodRmiIIOPReturn.java
    LocalInterfaceRemoteException.java
    MDBImplementsListenerMethods.java
    MessageListenerMethodModifiers.java
    MethodsExist.java
    QueryMethodTest.java
    TaglibFunctionMethodTest.java
    TransactionDemarcationComponentInterface.java
    WSTest.java

    ASEjbIsReadOnlyBean.java
    ApplicationExceptionComponentInterfaceMethods.java
    ApplicationExceptionHomeInterfaceMethods.java
    CmpEjbCreateMethod.java
    CmpEjbNoInvalidCreateMethod.java
    EjbClassExposed.java
    EjbCreateMethodArgs.java
    EjbCreateMethodArgs.java
    EjbCreateMethodException.java
    EjbCreateMethodExceptions.java
    EjbCreateMethodFinal.java
    EjbCreateMethodFinal.java
    EjbCreateMethodName.java
    EjbCreateMethodName.java
    EjbCreateMethodPublic.java
    EjbCreateMethodPublic.java
    EjbCreateMethodReturn.java
    EjbCreateMethodReturn.java
    EjbCreateMethodStatic.java
    EjbCreateMethodStatic.java
    EjbFindByPrimaryKeyArgs.java
    EjbFindByPrimaryKeyException.java
    EjbFindByPrimaryKeyFinal.java
    EjbFindByPrimaryKeyName.java
    EjbFindByPrimaryKeyPublic.java
    EjbFindByPrimaryKeyReturn.java
    EjbFindByPrimaryKeyStatic.java
    EjbFinderMethodArgs.java
    EjbFinderMethodException.java
    EjbFinderMethodFinal.java
    EjbFinderMethodName.java
    EjbFinderMethodNameCmp.java
    EjbFinderMethodObjectNotFoundException.java
    EjbFinderMethodPublic.java
    EjbFinderMethodReturn.java
    EjbFinderMethodStatic.java
    EjbPostCreateMethodArgs.java
    EjbPostCreateMethodException.java
    EjbPostCreateMethodFinal.java
    EjbPostCreateMethodName.java
    EjbPostCreateMethodPublic.java
    EjbPostCreateMethodReturn.java
    EjbPostCreateMethodStatic.java
    EjbRemoveMethodNameExistInSLSB.java
    HomeInterfaceCreateMethodExceptionCreate.java
    HomeInterfaceCreateMethodExceptionCreate.java
    HomeInterfaceCreateMethodExceptionMatch.java
    HomeInterfaceCreateMethodExceptionMatch.java
    HomeInterfaceCreateMethodExceptionRemote.java
    HomeInterfaceCreateMethodExceptionRemote.java
    HomeInterfaceCreateMethodMatchArgs.java
    HomeInterfaceCreateMethodMatchArgs.java
    HomeInterfaceCreateMethodReturn.java
    HomeInterfaceCreateMethodReturn.java
    HomeInterfaceFindByPrimaryKeyArg.java
    HomeInterfaceFindByPrimaryKeyName.java
    HomeInterfaceFindByPrimaryKeyReturn.java
    HomeInterfaceFindMethodExceptionFinder.java
    HomeInterfaceFindMethodExceptionMatch.java
    HomeInterfaceFindMethodExceptionRemote.java
    HomeInterfaceFindMethodHasQuery.java
    HomeInterfaceFindMethodReturn.java
    HomeInterfaceNoFinderMethodNames.java
    HomeInterfacePostCreateMethodExceptionMatch.java
    HomeMethodRmiIIOPArgs.java
    HomeMethodRmiIIOPReturn.java
    HomeMethodTest.java
    InjectionTargetTest.java
    InterfaceMatchMethodArgs.java
    InterfaceMatchMethodException.java
    InterfaceMatchMethodReturn.java
    InterfaceMethodTest.java
    LocalInterfaceExposed.java
    PrimaryKeyClassMethodEqual.java
    PrimaryKeyClassMethodHashCode.java
    PrimaryKeyClassOpt.java
    PrimaryKeyClassOptReturn.java
    RmiIIOPUtils.java
    SelectMethodTest.java
    StatelessCreateNoArgs.java
    StatelessCreateOnlyOne.java
    StatelessCreateReturn.java
    StatelessEjbCreateHome.java
    TransactionDemarcationComponentInterface.java
    TransactionDemarcationHomeInterface.java
    TransactionDemarcationHomeInterface.java

Generated at Thu Sep 03 14:21:40 UTC 2015 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.