diff --git a/src/java/org/apache/commons/math/random/ValueServer.java b/src/java/org/apache/commons/math/random/ValueServer.java index 22880f59c..816890a25 100644 --- a/src/java/org/apache/commons/math/random/ValueServer.java +++ b/src/java/org/apache/commons/math/random/ValueServer.java @@ -302,16 +302,18 @@ public class ValueServer { /** * Gets next sequential value from the valuesFileURL. *

- * Throws an IOException if the read fails. + * Throws an IOException if the read fails.

*

* This method will open the valuesFileURL if there is no - * replay file open. + * replay file open.

*

* The valuesFileURL will be closed and reopened to wrap around - * from EOF to BOF if EOF is encountered. + * from EOF to BOF if EOF is encountered.

* * @return next value from the replay file * @throws IOException if there is a problem reading from the file + * @throws NumberFormatException if an invalid numeric string is + * encountered in the file */ private double getNextReplay() throws IOException { String str = null; @@ -323,7 +325,7 @@ public class ValueServer { resetReplayFile(); str = filePointer.readLine(); } - return new Double(str).doubleValue(); + return Double.valueOf(str).doubleValue(); } /**