commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t.@apache.org
Subject svn commit: r1240280 - /commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/OpenIntToFieldHashMap.java
Date Fri, 03 Feb 2012 18:19:21 GMT
Author: tn
Date: Fri Feb  3 18:19:21 2012
New Revision: 1240280

URL: http://svn.apache.org/viewvc?rev=1240280&view=rev
Log:
Replaced MathRuntimeException in util package.
JIRA: MATH-459

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/OpenIntToFieldHashMap.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/OpenIntToFieldHashMap.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/OpenIntToFieldHashMap.java?rev=1240280&r1=1240279&r2=1240280&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/OpenIntToFieldHashMap.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/OpenIntToFieldHashMap.java
Fri Feb  3 18:19:21 2012
@@ -25,8 +25,6 @@ import java.util.NoSuchElementException;
 
 import org.apache.commons.math.Field;
 import org.apache.commons.math.FieldElement;
-import org.apache.commons.math.MathRuntimeException;
-import org.apache.commons.math.exception.util.LocalizedFormats;
 
 /**
  * Open addressed map from int to FieldElement.
@@ -539,10 +537,10 @@ public class OpenIntToFieldHashMap<T ext
         public int key()
             throws ConcurrentModificationException, NoSuchElementException {
             if (referenceCount != count) {
-                throw MathRuntimeException.createConcurrentModificationException(LocalizedFormats.MAP_MODIFIED_WHILE_ITERATING);
+                throw new ConcurrentModificationException();
             }
             if (current < 0) {
-                throw MathRuntimeException.createNoSuchElementException(LocalizedFormats.ITERATOR_EXHAUSTED);
+                throw new NoSuchElementException();
             }
             return keys[current];
         }
@@ -556,10 +554,10 @@ public class OpenIntToFieldHashMap<T ext
         public T value()
             throws ConcurrentModificationException, NoSuchElementException {
             if (referenceCount != count) {
-                throw MathRuntimeException.createConcurrentModificationException(LocalizedFormats.MAP_MODIFIED_WHILE_ITERATING);
+                throw new ConcurrentModificationException();
             }
             if (current < 0) {
-                throw MathRuntimeException.createNoSuchElementException(LocalizedFormats.ITERATOR_EXHAUSTED);
+                throw new NoSuchElementException();
             }
             return values[current];
         }
@@ -573,7 +571,7 @@ public class OpenIntToFieldHashMap<T ext
             throws ConcurrentModificationException, NoSuchElementException {
 
             if (referenceCount != count) {
-                throw MathRuntimeException.createConcurrentModificationException(LocalizedFormats.MAP_MODIFIED_WHILE_ITERATING);
+                throw new ConcurrentModificationException();
             }
 
             // advance on step
@@ -587,7 +585,7 @@ public class OpenIntToFieldHashMap<T ext
             } catch (ArrayIndexOutOfBoundsException e) {
                 next = -2;
                 if (current < 0) {
-                    throw MathRuntimeException.createNoSuchElementException(LocalizedFormats.ITERATOR_EXHAUSTED);
+                    throw new NoSuchElementException();
                 }
             }
 



Mime
View raw message