IBM Support

PM79917: SETATTRIBUTE WILL ADD THE ATTRIBUTE IN THE MAP EVEN IF NULL

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Currently setAttribute will add the attribute in the map even
    if a null Object o has been passed
    
    void setAttribute(java.lang.String name,
    java.lang.Object o)
    
    According to the API, the attribute should be removed.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  All users of IBM WebSphere Application      *
    *                  Server versions 8.5 Liberty                 *
    ****************************************************************
    * PROBLEM DESCRIPTION: The getAttributeNames() method can      *
    *                      return an attribute name whose value    *
    *                      has been set to null                    *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    If the value passed into ServletRequest.setAttribute() and
    ServleContextt.setAttribute() is null, the effect should be
    the same as calling removeAttribute(). Currently the server
    ends up setting the value to null.
    

Problem conclusion

  • The WebContainer code is fixed to remove the attribute if the
    null object is passed to setAttribute().
    
    To get this new behavior a new webcontainer custom property
    needs to set,
    com.ibm.ws.webcontainer.removeAttributeForNullObject = true
    (false is default)
    or
    removeAttributeForNullObject = true (false is default)
    
    The instructions to set the new property are here,
    Add the above mentioned property using webcontainer element in
    the server.xml file.
    
    
    The fix for this APAR is currently targeted for inclusion in
    fix pack 8.5.0.2.  Please refer to the
    Recommended Updates page for delivery information:
    http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM79917

  • Reported component name

    LIBERTY PROFILE

  • Reported component ID

    5724J0814

  • Reported release

    850

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-01-03

  • Closed date

    2013-01-03

  • Last modified date

    2013-03-21

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

    PM71991

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

Fix information

  • Fixed component name

    LIBERTY PROFILE

  • Fixed component ID

    5724J0814

Applicable component levels

  • R850 PSY

       UP

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"850","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
29 October 2021