8116
2002-04-15 18:09:10 +0000
Update EL arithmetic operators to handle Strings
2004-11-16 19:05:39 +0000
1
1
1
Unclassified
Taglibs
Standard Taglib
unspecified
All
All
RESOLVED
FIXED
P3
normal
---
1
arista
dev
0
oldest_to_newest
13664
0
arista
2002-04-15 18:09:10 +0000
Change the EL to implement these new rules for handling Strings in
arithmetic operators:
A.3.5.1 Binary operators - A {+,-,*} B
if A and B are null, - return 0
if A or B is Float, Double, or a String containing ".", "e", or "E"
coerce both A and B to Double and apply operator
otherwise
coerce both A and B to Long and apply operator
if operator results in exception, error
A.3.5.2 Binary operator - A {/} B
if A and B are null, - return 0
otherwise coerce both A and B to Double and apply operator
if operator results in exception (such as divide by 0), error
A.3.5.3 Binary operator - A {%} B
if A and B are null, return 0
if A or B is Float, Double, or a String containing ".", "e", or "E"
coerce both A and B to Double and apply operator
otherwise
coerce both A and B to Long and apply operator
if operator results in exception (such as divide by 0), error
A.3.5.4 Unary minus operator - -A
if A is null, return 0
if A is a String
if A contains ".", "e", or "E"
coerce to a Double and apply operator
otherwise
coerce to a Long and apply operator
if operator results in exception, error
if A is Byte,Short,Integer,Long,Float,Double
retain type, apply operator
if operator results in exception, error
otherwise, error
13679
1
arista
2002-04-15 19:45:48 +0000
All of these changes have been made