IBM Support

PH38133: Incorrect Expression Language (EL) Method Matching with Varargs

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

  • After migrating from WLP 20.0.0.6 to 21.0.0.3, the developers
    noticed some problem with a method that exists with several
    different signatures.
    Wrong Bean's method called in a JSF page
    the issue occurs due to a patch to optimize EL performance
    within the past year.
    

Local fix

Problem summary

  • ****************************************************************
    * USERS AFFECTED:  Users of EL 3.0 on Liberty                  *
    *                  21.0.0.3-21.0.0.8, Users of EL on           *
    *                  WebSphere 9.0                               *
    ****************************************************************
    * PROBLEM DESCRIPTION: EL may select the wrong                 *
    *                      method or throw a                       *
    *                      MethodNotFoundException when varargs    *
    *                      are used.                               *
    ****************************************************************
    * RECOMMENDATION:                                              *
    ****************************************************************
    When Expression Language (EL) attempts to resolve a method in
    bean, it may select the wrong method or throw a
    MethodNotFoundException if varargs are used within the
    bean.
     óÔé¼ ¿ óÔé¼ ¿For instance,  $(bean.sayHello("Hi")) would throw
    MethodNotFoundException if the method sayHello is
    declared as óÔé¼ ¿ óÔé¼ ¿ public String sayHello(String... text)
    Otherwise, $(bean.bark(dog)), where dog is of type Animal, may
    call the second method instead of the first.
     óÔé¼ ¿ óÔé¼ ¿public String bark(Animal animal){}
     óÔé¼ ¿ óÔé¼ ¿public String bark(Dog dog, String... text){}
     óÔé¼ ¿ óÔé¼ ¿The link to Tomcat Bugzilla issue is
    https://bz.apache.org/bugzilla/show_bug.cgi?id=65358.
    

Problem conclusion

  • The EL code has been updated to select methods as closely as
    possible to the Java compiler. However, due to ambiguity in
    the EL spec and the additional EL requirement of type
    coercion, the EL implementation may still select different
    methods when varargs are defined. For more details please read
    comment 9
    (https://bz.apache.org/bugzilla/show_bug.cgi?id=65358#c9)
    in the Bugzilla issue explaining the priority of matching. If
    an unintended method is selected under these circumstances, we
    recommend reworking the method definitions.
    
    The fix for this APAR is targeted for inclusion in Websphere
    version 9.0.5.10, and Liberty version 21.0.0.9. For more
    information, see 'Recommended Updates for WebSphere
    Application Server':
    https://www.ibm.com/support/pages/node/715553
    

Temporary fix

Comments

APAR Information

  • APAR number

    PH38133

  • Reported component name

    WEBSPHERE APP S

  • Reported component ID

    5724J0800

  • Reported release

    900

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt / Xsystem

  • Submitted date

    2021-06-15

  • Closed date

    2021-08-31

  • Last modified date

    2021-08-31

  • 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

    WEBSPHERE APP S

  • Fixed component ID

    5724J0800

Applicable component levels

  • R900 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":"9.0","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
01 November 2021