IBM Support

IV49646: SYNCHRONIZED METHOD IN SUB-CLASS FAILS TO OVERRIDE SAME METHOD I N SUPER-CLASS

Subscribe to this APAR

By subscribing, you receive periodic emails alerting you to the status of the APAR, along with a link to the fix after it becomes available. You can track this item individually or track all items by product.

Notify me when this APAR changes.

Notify me when an APAR for this component changes.

 

APAR status

  • Closed as program error.

Error description

  • Error Message: An unexpected exception (e.g.
    java.lang.reflect.InvocationTargetException) is thrown by a Java
    program in which one class extends another and overrides one of
    its methods with a synchronized version, e.g.
    class Parent {
      public void foo() {
        ...
      }
    }
    class Child extends Parent {
      public synchronized void foo() {
        super.foo();
      }
    }
    .
    Stack Trace: N/A
    .
    

Local fix

  • Explicitly synchronizing within the overriding method will avoid
    the exception, e.g.
    public synchronized void foo() {
      synchronized (this) {
        super.foo();
      }
    }
    

Problem summary

  • The problem is caused by the JIT compiler which fails to
    consider all method modifiers when determining whether a method
    in a sub-class has overridden any method in the super-classes.
    If it draws the wrong conclusion and then compiles such methods,
    or inlines them into their callers, the method in the
    super-class will appear to be non-overridden, which can lead to
    various incorrect behaviours in the program, such as throwing an
    InvocationTargetException.
    

Problem conclusion

  • This defect will be fixed in:
    7.0.0 SR6
    6.0.1 SR7
    .
    The JIT compiler has been updated to check all modifiers on
    methods when an sub-class is loaded.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV49646

  • Reported component name

    JIT

  • Reported component ID

    620700124

  • Reported release

    260

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-09-18

  • Closed date

    2013-09-18

  • Last modified date

    2013-09-26

  • 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

    JIT

  • Fixed component ID

    620700124

Applicable component levels

  • R260 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSC9HBA","label":"Just In Time (JIT) Compiler"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"260","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
26 September 2013