Author: psteitz
Date: Sun Oct 2 18:20:18 2011
New Revision: 1178213
URL: http://svn.apache.org/viewvc?rev=1178213&view=rev
Log:
Replaced obsolete exceptions.
Modified:
commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/OpenIntToDoubleHashMap.java
Modified:
commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/OpenIntToDoubleHashMap.java
URL:
http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/OpenIntToDoubleHashMap.java?rev=1178213&r1=1178212&r2=1178213&view=diff
==============================================================================
---
commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/OpenIntToDoubleHashMap.java
(original)
+++
commons/proper/math/trunk/src/main/java/org/apache/commons/math/util/OpenIntToDoubleHashMap.java
Sun Oct 2 18:20:18 2011
@@ -23,7 +23,6 @@ import java.io.Serializable;
import java.util.ConcurrentModificationException;
import java.util.NoSuchElementException;
-import org.apache.commons.math.MathRuntimeException;
import org.apache.commons.math.exception.util.LocalizedFormats;
/**
@@ -527,10 +526,10 @@ public class OpenIntToDoubleHashMap impl
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];
}
@@ -544,10 +543,10 @@ public class OpenIntToDoubleHashMap impl
public double 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];
}
@@ -561,7 +560,7 @@ public class OpenIntToDoubleHashMap impl
throws ConcurrentModificationException, NoSuchElementException {
if (referenceCount != count) {
- throw
MathRuntimeException.createConcurrentModificationException(LocalizedFormats.MAP_MODIFIED_WHILE_ITERATING);
+ throw new ConcurrentModificationException();
}
// advance on step
@@ -575,7 +574,7 @@ public class OpenIntToDoubleHashMap impl
} catch (ArrayIndexOutOfBoundsException e) {
next = -2;
if (current < 0) {
- throw
MathRuntimeException.createNoSuchElementException(LocalizedFormats.ITERATOR_EXHAUSTED);
+ throw new NoSuchElementException();
}
}