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

            Bug ID: 70249
           Summary: EL in Tomcat 12-M1: NPE coerceToNumber()
           Product: Tomcat 11
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: EL
          Assignee: [email protected]
          Reporter: [email protected]
  Target Milestone: -------

During preliminary preparation for Tomcat 12 I encountered a problem with EL
expressions in JSP-pages.  

After reducing the JPS code to 

A - ${ ["11", "2", "1"].stream().sorted( (a,b) ->
Long.valueOf(a).compareTo(Long.valueOf(b))).toList() } <br>
B - ${ ["11", "2", "1"].stream().sorted( (a,b) -> Integer.parseInt(a) -
Integer.parseInt(b)).toList() } <br>
C - ${ ["11", "2", "1"].stream().sorted( (a,b) -> a.compareTo(b)).toList() }
<br>

it throws a NPE at (A): Cannot invoke "java.lang.Number.intValue()" because the
return value of
"org.apache.el.lang.ELSupport.coerceToNumber(jakarta.el.ELContext, Object,
java.lang.Class)" is null.

in 12.0.0-M1-dev, which works fine in 11.0.26.

Cases (B) and (C) work as expected.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to