EL does not coerce String to Integer in equals operation in EAP 7
Issue
EAP 7's EL equals operations work differently from EAP 6 one. EL does not coerce String to Integer in equals operation in EAP 7.
For example: put the following test.jsp in your web application (e.g. example.war)
<% request.setAttribute("testAttr", "01"); %>
${testAttr == 1}</br>
${param['foo'] == 1}<br>
${1 == param['foo']}<br>
${1 == (0+param['foo'])}<br>
Then, access the above JSP with the following curl command:
$ curl http://localhost:8080/example/test.jsp?foo=01
EAP 6's expected result:
true<br>
true<br>
true<br>
true<br>
EAP 7's actual result:
false<br>
false<br>
false<br>
true<br>
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 7.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.