ASF Bugzilla – Attachment 22355 Details for
Bug 43656
ELSupport.coerceToType won't handle null for java.lang.Number
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Removed unnecessary Object-creation in coerceToNumber()
tomcat6_0_18-bug_43656_p3.diff (text/plain), 1.09 KB, created by
Nils Eckert
on 2008-08-03 07:05:12 UTC
(
hide
)
Description:
Removed unnecessary Object-creation in coerceToNumber()
Filename:
MIME Type:
Creator:
Nils Eckert
Created:
2008-08-03 07:05:12 UTC
Size:
1.09 KB
patch
obsolete
>Index: java/org/apache/el/lang/ELSupport.java >=================================================================== >--- java/org/apache/el/lang/ELSupport.java (revision 682174) >+++ java/org/apache/el/lang/ELSupport.java (working copy) >@@ -226,18 +226,18 @@ > return ((BigDecimal) number).toBigInteger(); > } > if (number instanceof BigInteger) { >- return new BigInteger(number.toString()); >+ return number; > } > return BigInteger.valueOf(number.longValue()); > } > if (BigDecimal.class.equals(type)) { > if (number instanceof BigDecimal) { >- return new BigDecimal(number.toString()); >+ return number; > } > if (number instanceof BigInteger) { > return new BigDecimal((BigInteger) number); > } >- return new BigDecimal(number.doubleValue()); >+ return new BigDecimal(number.toString()); > } > if (Byte.TYPE == type || Byte.class.equals(type)) { > return new Byte(number.byteValue());
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 43656
:
21831
|
22354
| 22355 |
24144
|
24145
|
24692