IBM Support

IZ87776: TYPE SAFETY ISSUE WITH CLASS.GETCONSTRUCTOR()

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Error Message: N/A
    .
    Stack Trace: N/A
    .
    In the following scenario, a NoSuchMethodException should be
    thrown from Class.getConstructor(), but is not thrown by the IBM
    JVM.
    1. We have two classes, TestClassA and TestClassB. TestClassA
    has a
       constructor which takes a TestClassB instance as a parameter.
    2. We load TestClassA on the system classloader, and load
    TestClassB on
       a custom classloader (via a call to defineClass()).
    3. We then try to locate the constructor in the TestClassA Class
    via
       reflection, specifying the TestClassB Class as the parameter
    type.
    

Local fix

Problem summary

  • The problem is caused when the parameter types passed to
    java.lang.Class.getConstructor() match the signature of a
    constructor in the receiver, but do not match the parameter
    types loaded by the receiver's class loader.
    

Problem conclusion

  • This defect will be fixed in:
    6.0.0 SR9
    .
    The JVM and the java.lang.Class.getConstructor() implementation
    have been updated to check that the parameter types passed to
    Class.getConstructor() match the parameter types loaded by the
    receiver's class loader, and to throw a NoSuchMethodException if
    the parameter types do not match.
    .
    To obtain the fix:
    Install build 20101013 or later
    

Temporary fix

Comments

APAR Information

  • APAR number

    IZ87776

  • Reported component name

    J9 COMMON CODE

  • Reported component ID

    620700127

  • Reported release

    600

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2010-11-02

  • Closed date

    2010-11-02

  • Last modified date

    2010-11-22

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    J9 COMMON CODE

  • Fixed component ID

    620700127

Applicable component levels

  • R600 PSN

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSCVQ3W","label":"Virtual Machine"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
22 November 2010