tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 43656] ELSupport.coerceToType modifies BigDecimal Values
Date Sun, 03 Aug 2008 14:05:12 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=43656





--- Comment #8 from Nils Eckert <mail@nils-eckert.de>  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: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message