Anonymous | Login | Signup for a new account | 12-17-2024 14:38 PST |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||||
ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||||
0000919 | [Resin] | major | always | 02-06-06 17:15 | 04-07-06 10:02 | ||||
Reporter | m5 | View Status | public | ||||||
Assigned To | ferg | ||||||||
Priority | normal | Resolution | fixed | ||||||
Status | closed | Product Version | 3.0.17 | ||||||
Summary | 0000919: JSTL EL: numeric binary expression type promotion order is out-of-spec | ||||||||
Description |
The JSP 2.0 specification (JSP.2.3.5.1) specifies the sequence in which type promotion checks on binary operator arguments should be performed. In particular, the specification calls for the treatment of String-valued operands that include "tell-tale" float/double characters to be identical to that of actual Float or Double operands. That is, the presence of a String-valued operand that "looks like" a Float or a Double is supposed to cause the binary operator to be evaluated against the pair of operands after coercing them both to Double. The Resin "BinaryExpr" class, however, has tests that prefer operands that are "Number" instances to Strings that look like Doubles. The result is that an expression like ${0 + some.string.property} will fail when the String operand looks like "1.0". The failure occurs because Resin notices that the first operand is a Long (i.e., a Number) before it checks to see whether the second operand is a String that looks like a Double. In my opinion that behavior is clearly counter to the spec. For reasons I can't explain, this did not seem to be a problem in the 3.0.14 version, though the code seems similar in intent. |
||||||||
Additional Information |
Incidentally, in the 3.0.17 source there's a bug that was also in the 3.0.14 source. The test to see whether the "B" operand is a Float or a Double instead checks to see whether it's a Double twice: if (bObj instanceof Double || bObj instanceof Double) { (line 112 in the 3.0.17 source). |
||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
30 total queries executed. 26 unique queries executed. |