commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r377903 - /jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTMethod.java
Date Wed, 15 Feb 2006 00:08:50 GMT
Author: dion
Date: Tue Feb 14 16:08:48 2006
New Revision: 377903

URL: http://svn.apache.org/viewcvs?rev=377903&view=rev
Log:
Support narrowing of BigDecimal and BigInteger

Modified:
    jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTMethod.java

Modified: jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTMethod.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTMethod.java?rev=377903&r1=377902&r2=377903&view=diff
==============================================================================
--- jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTMethod.java
(original)
+++ jakarta/commons/proper/jexl/trunk/src/java/org/apache/commons/jexl/parser/ASTMethod.java
Tue Feb 14 16:08:48 2006
@@ -1,6 +1,8 @@
 package org.apache.commons.jexl.parser;
 
 import java.lang.reflect.InvocationTargetException;
+import java.math.BigDecimal;
+import java.math.BigInteger;
 
 import org.apache.commons.jexl.JexlContext;
 import org.apache.commons.jexl.util.Introspector;
@@ -97,7 +99,7 @@
      */
     private Number narrow(Number original)
     {
-    	if (original == null) return null;
+    	if (original == null || original instanceof BigDecimal || original instanceof BigInteger)
return original; 
     	Number result = original;
     	if (original instanceof Double || original instanceof Float)
     	{



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message