Summary: | EL evaluation of floating-point String value vs BigInteger loses precision | ||
---|---|---|---|
Product: | Tomcat 6 | Reporter: | Konstantin Kolinko <knst.kolinko> |
Component: | Jasper | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | minor | ||
Priority: | P2 | ||
Version: | 6.0.29 | ||
Target Milestone: | default | ||
Hardware: | All | ||
OS: | All | ||
Attachments: |
Patch to check for a BigInteger parameter before coercing to a double
ELArithmetic test case |
Description
Konstantin Kolinko
2010-12-19 19:00:53 UTC
Created attachment 26429 [details]
Patch to check for a BigInteger parameter before coercing to a double
This patch will correctly handle cases where a string, double, or float is added, subtracted, or multiplied by a BigInteger. It does this by checking to see if one of the parameters of a method call is a BigInteger if it knows the other is a float, double, or string containing '.', 'e' or 'E'
Created attachment 26430 [details]
ELArithmetic test case
Thanks for the patches. I applied them (with some minor alterations after reviewing the spec) to 7.0.x and they will be included in 7.0.6 onwards. I also proposed back-porting the changes to 6.0.x. Since this is now fixed in 7.0.x, I'm moving this issue to 6.0.x Fixed in 6.0.x and will be included in 6.0.30 onwards. |