DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2009-12-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656

--- Comment #26 from Adam Hardy adam.ha...@cyberspaceroad.com 2009-12-11 
07:09:30 UTC ---
Created an attachment (id=24692)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=24692)
zip containing JSP, TLD and java file

I came across this bug today - at least it looks a lot like it. 

If I try to pass in a null to the function, it falls over giving me the
following:

java.lang.IllegalArgumentException: Cannot convert 0 of type class
java.lang.Long to class java.lang.Number
org.apache.el.lang.ELSupport.coerceToNumber(ELSupport.java:250)

Which is at best misleading and at worst, just the wrong way to handle nulls.
Hopefully this is reproducible everywhere.

-- 
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: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2009-12-11 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656

Adam Hardy adam.ha...@cyberspaceroad.com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|WORKSFORME  |

--- Comment #27 from Adam Hardy adam.ha...@cyberspaceroad.com 2009-12-11 
07:11:44 UTC ---
The attached zip causes the stack trace in 6.0.20

-- 
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: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2009-09-14 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656

--- Comment #25 from Luke Kolin l...@sce.net 2009-09-14 11:40:12 PDT ---
Could you send me the compiled JSP source code?

-- 
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: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2009-09-09 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656


Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||WORKSFORME


--- Comment #24 from Mark Thomas ma...@apache.org 2009-09-09 12:11:34 BST ---
The test case isn't clean (it references a class that doe snot exist) but once
I clean it up this works for me with 6.0.20, 6.0.x and trunk.

If you still see this issue with the 6.0.x or later, please provide a working
test case that demonstrates the issue.

-- 
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: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2009-08-18 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656



--- Comment #21 from Luke Kolin l...@sce.net 2009-08-18 09:33:36 PDT ---
Created an attachment (id=24144)
TLD for tag

This is the TLD for the JSP where we pass in Number.class to coerceToNumber.

-- 
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: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2009-08-18 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656



--- Comment #22 from Luke Kolin l...@sce.net 2009-08-18 09:34:49 PDT ---
Created an attachment (id=24145)
JSP and Tag source

This is the JSP and Tag sources for the JSP where we pass in Number.class to
coerceToNumber.

-- 
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: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2009-08-18 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656



--- Comment #23 from Luke Kolin l...@sce.net 2009-08-18 09:35:45 PDT ---
This is a simple JSP I have created that should exhibit the behavior, along
with a stripped-down TLD and tag sources.

The key I believe is to look at the compiled JSP's source and see what is
getting passed in the setValue() method call.

-- 
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: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2009-08-17 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656



--- Comment #20 from Mark Thomas ma...@apache.org 2009-08-17 20:25:43 BST ---
It is easier if we have access to the source. Can you provide source files for
the simplest possible jsp, tld and tag combination that demonstrates the issue?

-- 
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: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2009-08-16 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656


Mark Thomas ma...@apache.org changed:

   What|Removed |Added

 Status|REOPENED|NEEDINFO


--- Comment #18 from Mark Thomas ma...@apache.org 2009-08-16 22:04:03 BST ---
Mark as needing info

-- 
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: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2009-08-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656


Luke Kolin l...@sce.net changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |


--- Comment #16 from Luke Kolin l...@sce.net 2009-08-15 11:43:16 PDT ---
This does not appear to be fixed, but I'm not sure if the problem rests with
the code here or JSPC. I get the following error when executing a JSP:

Cannot convert 0 of type class java.lang.Long to class java.lang.Number

java.lang.IllegalArgumentException

org.apache.el.lang.ELSupport.coerceToNumber(ELSupport.java:250)
org.apache.el.lang.ELSupport.coerceToNumber(ELSupport.java:257)
org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:351)
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:188)
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:935)
org.deltava.jsp.admin.diagnostics_jsp._jspx_meth_fmt_005fint_005f8(diagnostics_jsp.java)
org.deltava.jsp.admin.diagnostics_jsp._jspx_meth_el_005ftable_005f0(diagnostics_jsp.java)


Looking at the the method call, I see this in the JSP source:

_jspx_th_fmt_005fint_005f8.setValue((java.lang.Number)
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(${mapsAPIUsage},
java.lang.Number.class, (PageContext)_jspx_page_context, null, false));

The ELSupport.coerceToNumber(Number, Class) method appears to fail if the Class
specified is java.lang.Number; there's no way it can execute without throwing
an exception.

-- 
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: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2009-08-15 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656



--- Comment #17 from Mark Thomas ma...@apache.org 2009-08-15 20:55:36 BST ---
Can you attach the simplest JSP that exhibits this error?

-- 
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: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org



DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2008-12-02 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656


Mark Thomas [EMAIL PROTECTED] changed:

   What|Removed |Added

 CC||[EMAIL PROTECTED]




--- Comment #15 from Mark Thomas [EMAIL PROTECTED]  2008-12-02 10:22:21 PST 
---
*** Bug 46325 has been marked as a duplicate of this bug. ***


-- 
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]



DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2008-10-27 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656


Mark Thomas [EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||FIXED




--- Comment #14 from Mark Thomas [EMAIL PROTECTED]  2008-10-27 06:00:40 PST 
---
Thanks for the fix. It has been applied to 6.0.x and will be included in 6.0.19
onwards.


-- 
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]



DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2008-10-08 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656





--- Comment #13 from Mark Thomas [EMAIL PROTECTED]  2008-10-08 03:27:33 PST 
---
I only reverted the change to number.doubleValue()


-- 
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]



DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2008-10-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656





--- Comment #9 from Mark Thomas [EMAIL PROTECTED]  2008-10-03 09:22:13 PST ---
Thanks for the patch.

I have committed it to trunk and proposed it for 6.0.x


-- 
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]



DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2008-08-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656





--- Comment #7 from Nils Eckert [EMAIL PROTECTED]  2008-08-03 06:56:10 PST ---
Created an attachment (id=22354)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=22354)
Testcase and fix for the Integer to Number issue

This fix returns the input-value if it is assignable to the given type.


-- 
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]



DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2008-08-03 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656





--- Comment #8 from Nils Eckert [EMAIL PROTECTED]  2008-08-03 07:05:12 PST ---
Created an attachment (id=22355)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=22355)
Removed unnecessary Object-creation in coerceToNumber()

The method protected final static Number coerceToNumber(final Number number,
final Class type) created new BigInteger or BigDecimal Objects if the
input-value was of the given type. As far as BigInteger and BigDecimal are
immutable we can return the input value.

Another possible risk is the number.doubleValue() in the BigDecimal if clause.
This behaves different to the coerceToType Method and was replaced with
number.toString().


-- 
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]



DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2008-08-02 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656


Luke Kolin [EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|FIXED   |




--- Comment #6 from Luke Kolin [EMAIL PROTECTED]  2008-08-02 09:27:15 PST ---
I think that this fix may have introduced a regression error, since after
upgrading from 6.0.16 to 6.0.18 I am getting this error:

Cannot convert 4,390,241 of type class java.lang.Integer to class
java.lang.Number

java.lang.IllegalArgumentException

org.apache.el.lang.ELSupport.coerceToNumber(ELSupport.java:252)
org.apache.el.lang.ELSupport.coerceToNumber(ELSupport.java:265)
org.apache.el.lang.ELSupport.coerceToType(ELSupport.java:353)
org.apache.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:188)
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:925)
org.deltava.jsp.main.home_jsp._jspx_meth_fmt_005fint_005f0(home_jsp.java)


-- 
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]



DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2008-05-01 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656


Mark Thomas [EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED




--- Comment #5 from Mark Thomas [EMAIL PROTECTED]  2008-05-01 10:38:10 PST ---
This has now been committed to 6.0.x and will be in 6.0.17 onwards.


-- 
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]



DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2008-04-19 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656





--- Comment #4 from Mark Thomas [EMAIL PROTECTED]  2008-04-19 02:51:39 PST ---
Thanks for the test case. I have added the unit test and the necessary fixes to
trunk. They have also been proposed for 6.0.x


-- 
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]



DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2008-04-18 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656





--- Comment #2 from Konstantin Kolinko [EMAIL PROTECTED]  2008-04-18 20:03:29 
PST ---
Well, the patch (as proposed in rev. 649639) fixes
ELSupport.coerceToType(Object, Class), but the bug itself is in
ELSupport.coerceToNumber(Number, Class).

There do exist other ways how coerceToNumber() is called from public methods of
ELSupport.

For example, ELSupport.compare(Object, Object) calls it. I suppose, that those
methods may suffer until coerceToNumber() itself is fixed.

The fix is OK for coerceToType() though.


-- 
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]



DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values

2008-04-18 Thread bugzilla
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656





--- Comment #3 from Konstantin Kolinko [EMAIL PROTECTED]  2008-04-18 20:19:52 
PST ---
Created an attachment (id=21831)
 -- (https://issues.apache.org/bugzilla/attachment.cgi?id=21831)
Testcase against ELSupport.coerceToNumber

It is a test case against ELSupport.coerceToNumber().

The tests with BigDecimal and BigInteger classes are failing.


-- 
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]