commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From celes...@apache.org
Subject svn commit: r1353451 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util: Incrementor.java IterationManager.java
Date Mon, 25 Jun 2012 10:44:41 GMT
Author: celestin
Date: Mon Jun 25 10:44:38 2012
New Revision: 1353451

URL: http://svn.apache.org/viewvc?rev=1353451&view=rev
Log:
Replaced NullPointerException with NullArgumentException.

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/Incrementor.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/IterationManager.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/Incrementor.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/Incrementor.java?rev=1353451&r1=1353450&r2=1353451&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/Incrementor.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/Incrementor.java
Mon Jun 25 10:44:38 2012
@@ -17,6 +17,7 @@
 package org.apache.commons.math3.util;
 
 import org.apache.commons.math3.exception.MaxCountExceededException;
+import org.apache.commons.math3.exception.NullArgumentException;
 
 /**
  * Utility that increments a counter until a maximum is reached, at
@@ -73,12 +74,12 @@ public class Incrementor {
      *
      * @param max Maximal count.
      * @param cb Function to be called when the maximal count has been reached.
-     * @throws NullPointerException if {@code cb} is {@code null}
+     * @throws NullArgumentException if {@code cb} is {@code null}
      */
     public Incrementor(int max,
                        MaxCountExceededCallback cb) {
         if (cb == null){
-            throw new NullPointerException();
+            throw new NullArgumentException();
         }
         maximalCount = max;
         maxCountCallback = cb;

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/IterationManager.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/IterationManager.java?rev=1353451&r1=1353450&r2=1353451&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/IterationManager.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/util/IterationManager.java
Mon Jun 25 10:44:38 2012
@@ -20,6 +20,7 @@ import java.util.Collection;
 import java.util.concurrent.CopyOnWriteArrayList;
 
 import org.apache.commons.math3.exception.MaxCountExceededException;
+import org.apache.commons.math3.exception.NullArgumentException;
 
 /**
  * This abstract class provides a general framework for managing iterative
@@ -53,12 +54,12 @@ public class IterationManager {
      * @param maxIterations the maximum number of iterations
      * @param callBack the function to be called when the maximum number of
      * iterations has been reached
-     * @throws NullPointerException if {@code callBack} is {@code null}
+     * @throws NullArgumentException if {@code callBack} is {@code null}
      */
     public IterationManager(final int maxIterations,
                             final Incrementor.MaxCountExceededCallback callBack) {
         if (callBack == null) {
-            throw new NullPointerException();
+            throw new NullArgumentException();
         }
         this.iterations = new Incrementor(maxIterations, callBack);
         this.listeners = new CopyOnWriteArrayList<IterationListener>();



Mime
View raw message