commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hen...@apache.org
Subject svn commit: r927893 - /commons/proper/jexl/trunk/src/main/java/org/apache/commons/jexl2/JexlArithmetic.java
Date Fri, 26 Mar 2010 14:58:49 GMT
Author: henrib
Date: Fri Mar 26 14:58:48 2010
New Revision: 927893

URL: http://svn.apache.org/viewvc?rev=927893&view=rev
Log:
Made null operands control consistent with each other.

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=927893&r1=927892&r2=927893&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 Fri
Mar 26 14:58:48 2010
@@ -88,7 +88,10 @@ public class JexlArithmetic {
      * @return null if strict, else Long(0)
      */
     protected Object controlNullNullOperands() {
-        return strict? null : Integer.valueOf(0);
+        if (strict) {
+            throw new NullPointerException(JexlException.NULL_OPERAND);
+        }
+        return Integer.valueOf(0);
     }
 
     /**



Mime
View raw message