IBM Support

IV04519: ARRAYLIST MADE FROM MAP.KEYSET() FAILS TO CREATE PROPERLY

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Error Message: Customer code is using
    private Map map = new ConcurrentHashMap();
    ArrayList ar = new ArrayList(map.keySet());
    Newly created ArrayList is seen to have null entries, while it
    was iteratored.
    .
    Stack Trace: N/A
    .
    

Local fix

  • N/A
    

Problem summary

  • With ArrayList.toArray(T[] a) method, if the collection list
    fits in the specified array, it is returned therein.  Otherwise,
    a new array is allocated with the runtime type of the specified
    array and the size of collection list.
    The problem occurs with existing code whenever new allocation of
    array object happens with ArrayList toArray(T[] a) method. As
    returned new array object reference is not set back with
    ArrayList constructor it will never being taken care. In this
    case as the passed elementData (ArrayList store data with this
    variable) will not initialized and thus have null entries.
    

Problem conclusion

  • This defect will be fixed in:
    5.0.0 SR13
    
    JVM is being modifed to set ArrayList constructor with return
    value of Collection.toArray(T[] a) method. So that it would
    reference a new array object being instantiated in between.
    

Temporary fix

Comments

APAR Information

  • APAR number

    IV04519

  • Reported component name

    JAVA 5 CLASS LI

  • Reported component ID

    620500130

  • Reported release

    500

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-08-08

  • Closed date

    2011-10-09

  • Last modified date

    2011-10-09

  • 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 5 CLASS LI

  • Fixed component ID

    620500130

Applicable component levels

  • R500 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":"5.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
09 October 2011