Summary: | Tomcat's EL implementation doesn't coerce custom Number subclasses | ||
---|---|---|---|
Product: | Tomcat 6 | Reporter: | Maksim Kaszynski <kaszynski> |
Component: | Jasper | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | major | ||
Priority: | P2 | ||
Version: | 6.0.14 | ||
Target Milestone: | default | ||
Hardware: | All | ||
OS: | All | ||
URL: | http://jira.jboss.com/jira/browse/RF-1715 | ||
Attachments: | Code cleanup for org.apache.el.* - removes attempts to compare Object classes against primitive types. |
Description
Maksim Kaszynski
2008-04-07 08:17:32 UTC
I've committed a fix to trunk. The original code is a mystery to me too at the minute. I'll propose this for 6.0.x once people on the list have had a couple of days to mull it over. Created attachment 21797 [details]
Code cleanup for org.apache.el.* - removes attempts to compare Object classes against primitive types.
Code cleanup for several classes in org.apache.el.**
In those classes there are places where java.lang.Class instances are compared against classes of primitive types (such as Long.TYPE, Integer.TYPE, etc.)
In the case when those java.lang.Class instances are a result of object.getClass() call (that is, obtained from an Object), they cannot be equal to a primitive type. In such case these comparisons are no-op, producing the value of false.
This patch removes these no-op comparisons from the code.
The patch has been applied to 6.0.x and will be in 6.0.17 onwards. |