https://issues.apache.org/bugzilla/show_bug.cgi?id=45953
Summary: ELSupport.coerceToNumber with Number as type
Product: Tomcat 6
Version: 6.0.18
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: Jasper
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
I have recently upgraded to 6.0.18 and i am getting this exception:
java.lang.IllegalArgumentException: Cannot convert 0 of type class
java.lang.Long to class java.lang.Number
at org.apache.el.lang.ELSupport.coerceToNumber(ELSupport.java:252)
at org.apache.el.lang.ELSupport.coerceToNumber(ELSupport.java:259)
at org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:353)
at org.apache.el.parser.AstFunction.getValue(AstFunction.java:102)
at org.apache.el.parser.AstChoice.getValue(AstChoice.java:45)
at org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
at
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:925)
I have got a function, which can format any Number to String.
<function-signature>java.lang.String
formatNumber(int,java.lang.String,java.lang.String,java.lang.Number)</function-signature>
But it seems coerceToNumber can't handle a Number as Type.
Possible Solution:
If ELSupport.coerceToNumber is called with any Number instance as the first
Parameter ('number')and Number.class as second ('type') it should return the
first parameter without conversion.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]