https://bz.apache.org/bugzilla/show_bug.cgi?id=64778

            Bug ID: 64778
           Summary: org.apache.el.lang.ELSupport: methods removed
           Product: Tomcat 10
           Version: 10.0.0-M8
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: EL
          Assignee: dev@tomcat.apache.org
          Reporter: pnicolu...@gmail.com
  Target Milestone: ------

In versions of Tomcat EL after 7.0 (8.5/9/10) some ELSupport methods were
removed. For example:

public static final Number coerceToNumber(final Object obj,
            final Class<?> type) throws ELException {

It was replaced with:

 public static final Number coerceToNumber(final ELContext ctx, final Object
obj,
            final Class<?> type) throws ELException {

Would there be any objection to keeping the method and just calling into the
new method such as:

    public static final Number coerceToNumber(final Object obj,
            final Class<?> type) throws ELException {
        return coerceToNumber(null, obj, type);
    }

The Tomcat EL is used in OpenLiberty and the JSP engine supports Java EE6+ and
uses the "ELSupport.coerceToNumber(obj,type)" method. Removing it from the EL
causes some issues as it exists in some implementations of the EL and not in
others.

As far as I can tell it was removed here:
https://github.com/apache/tomcat/commit/7188bef15866902ad5fd76d41c63318cf3463de7#diff-13b383a5ea3f46e7d0badca7edcfbdec

I'm willing to create a PR for these changes if no objections. There are a
number of other ELSupport methods that were changed in a similar way and I
would propose we do a similar change for them as well.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to