Mantis - Resin
Viewing Issue Advanced Details
1225 minor always 06-29-06 18:29 06-30-06 08:21
ferg  
ferg  
urgent  
closed  
fixed  
none    
none 3.0.20  
0001225: EL issues with 1 == 1.0
(rep by Jill Wetzler)

I’ve been trying to upgrade our website from our last version of Resin (Resin-pro-3.0.12) to the newest (3.0.19), and I’ve run into a couple of EL issues that seem to be causing a lot of problems on our end, and frankly I’m at a loss for where to find the source of them.
 
The first problem I encountered is in el/CmpExpr.java in evalBoolean, where aObj is a String that represents a double, and bObj is a long. Clearly it falls through to the case of (aObj instanceof Number || bObj instanceof Number), which then tries to convert both numbers to longs, obviously throwing an exception for the double String. I was able to fix it by converting both of them to doubles instead, but what we can’t seem to understand is that this file is almost completely unchanged between 12 and 19, so I’m not sure why it is failing now and wasn’t in the previous version. Do you have any insight into this? It’s a pretty odd corner case that I’m surprised hasn’t caused us problems in the past.
 
The more pressing issue however, is that somehow, the expression 1.0 == 1 has started returning false in an EL expression. So we have a particular line that says:
<c:if test="${cat.NavLevel__c == 1}">
And cat.NavLevel__c is 1.0. This used to evaluate to true (and still does under 12). However it is now evaluating to false. I’m afraid we have this is too many obscure places to go through and find them all.
On http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSPIntro7.html, [^]
It has a specific example:
EL Expression: ${100.0 == 100}
Result: true
 
I wouldn’t automatically assume this was a Resin issue, but it works fine in 12. Do you have any idea what could be causing this?

Notes
(0001368)
ferg   
06-30-06 08:21   
jsp/1c18