IBM Support

IV35581: IMPLEMENT HASHCODE EQUALITY CHECKS WITH MAP GET/PUT OPERATIONS

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: N/A
    .
    Stack Trace: N/A
    .
    If a class doesn't implement the equals method correctly, and
    its instances are used as key of Map. When using Map.get, it may
    return another instance; When using Map.put, it is possible to
    replace an instance whose key's hashcode is not the same but
    key's equals method returns true.
    This is not a bug in our code, but caused by the error
    implemented equals method. However, the map can check hashcode
    before euqals method to avoid this kind of issues.
    

Local fix

Problem summary

  • If a class doesn't implement equals method correctly, when
    instances of the class are used as key of WeakHashmap, they may
    cause the WeakHashmap to replace value in mistake.
    

Problem conclusion

  • This defect will be fixed in:
    6.0.0 SR13
    6.0.1 SR5
    .
    Add hashcode check before invoke euqals method when check keys'
    equality in WeakHashmap.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV35581

  • Reported component name

    JAVA CLASS LIBS

  • Reported component ID

    620700130

  • Reported release

    600

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-01-21

  • Closed date

    2013-01-21

  • Last modified date

    2013-01-21

  • 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

    JAVA CLASS LIBS

  • Fixed component ID

    620700130

Applicable component levels

  • R600 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSCVQ3Y","label":"Java Class Libraries"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
21 January 2013