From 830f26924725864a566f245f2c97f069fe36ad68 Mon Sep 17 00:00:00 2001 From: Phil Steitz Date: Thu, 31 May 2007 07:58:32 +0000 Subject: [PATCH] Javadoc; changed string double generator to use valueOf. git-svn-id: https://svn.apache.org/repos/asf/jakarta/commons/proper/math/trunk@543079 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/commons/math/random/ValueServer.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) 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(); } /**