You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2011/11/28 16:58:47 UTC
svn commit: r1207337 -
/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java
Author: sebb
Date: Mon Nov 28 15:58:46 2011
New Revision: 1207337
URL: http://svn.apache.org/viewvc?rev=1207337&view=rev
Log:
Explicit unboxing
Modified:
commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java
Modified: commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java
URL: http://svn.apache.org/viewvc/commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java?rev=1207337&r1=1207336&r2=1207337&view=diff
==============================================================================
--- commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java (original)
+++ commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java Mon Nov 28 15:58:46 2011
@@ -829,7 +829,7 @@ public class JexlArithmetic {
controlNullOperand();
return 0;
} else if (val instanceof Double) {
- if (!Double.isNaN((Double) val)) {
+ if (!Double.isNaN(((Double) val).doubleValue())) {
return 0;
} else {
return ((Double) val).intValue();
@@ -862,7 +862,7 @@ public class JexlArithmetic {
controlNullOperand();
return 0L;
} else if (val instanceof Double) {
- if (!Double.isNaN((Double) val)) {
+ if (!Double.isNaN(((Double) val).doubleValue())) {
return 0;
} else {
return ((Double) val).longValue();
@@ -899,7 +899,7 @@ public class JexlArithmetic {
} else if (val instanceof BigInteger) {
return (BigInteger) val;
} else if (val instanceof Double) {
- if (!Double.isNaN((Double) val)) {
+ if (!Double.isNaN(((Double) val).doubleValue())) {
return new BigInteger(val.toString());
} else {
return BigInteger.ZERO;
@@ -942,7 +942,7 @@ public class JexlArithmetic {
}
return roundBigDecimal(new BigDecimal(string, getMathContext()));
} else if (val instanceof Double) {
- if (!Double.isNaN((Double) val)) {
+ if (!Double.isNaN(((Double) val).doubleValue())) {
return roundBigDecimal(new BigDecimal(val.toString(), getMathContext()));
} else {
return BigDecimal.ZERO;
@@ -1007,7 +1007,7 @@ public class JexlArithmetic {
return "";
} else if (val instanceof Double) {
Double dval = (Double) val;
- if (Double.isNaN(dval)) {
+ if (Double.isNaN(dval.doubleValue())) {
return "";
} else {
return dval.toString();