commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From er...@apache.org
Subject svn commit: r1421911 - in /commons/proper/math/trunk/src/main/java/org/apache/commons/math3/random: RandomDataImpl.java ValueServer.java
Date Fri, 14 Dec 2012 14:59:46 GMT
Author: erans
Date: Fri Dec 14 14:59:44 2012
New Revision: 1421911

URL: http://svn.apache.org/viewvc?rev=1421911&view=rev
Log:
MATH-916
Restore backwards-compatibility (for release 3.1).

Modified:
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/random/RandomDataImpl.java
    commons/proper/math/trunk/src/main/java/org/apache/commons/math3/random/ValueServer.java

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/random/RandomDataImpl.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/random/RandomDataImpl.java?rev=1421911&r1=1421910&r2=1421911&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/random/RandomDataImpl.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/random/RandomDataImpl.java
Fri Dec 14 14:59:44 2012
@@ -94,13 +94,14 @@ import org.apache.commons.math3.exceptio
  * @deprecated to be removed in 4.0.  Use {@link RandomDataGenerator} instead
  * @version $Id$
  */
+@Deprecated
 public class RandomDataImpl implements RandomData, Serializable {
 
     /** Serializable version identifier */
     private static final long serialVersionUID = -626730818244969716L;
 
     /** RandomDataGenerator delegate */
-    private RandomDataGenerator delegate;
+    private final RandomDataGenerator delegate;
 
     /**
      * Construct a RandomDataImpl, using a default random generator as the source
@@ -127,6 +128,15 @@ public class RandomDataImpl implements R
     }
 
     /**
+     * @param rand the source of (non-secure) random data
+     * @deprecated To be removed in 4.0.
+     */
+    @Deprecated
+    RandomDataGenerator getDelegate() {
+        return delegate;
+    }
+
+    /**
      * {@inheritDoc}
      * <p>
      * <strong>Algorithm Description:</strong> hex strings are generated using
a

Modified: commons/proper/math/trunk/src/main/java/org/apache/commons/math3/random/ValueServer.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/main/java/org/apache/commons/math3/random/ValueServer.java?rev=1421911&r1=1421910&r2=1421911&view=diff
==============================================================================
--- commons/proper/math/trunk/src/main/java/org/apache/commons/math3/random/ValueServer.java
(original)
+++ commons/proper/math/trunk/src/main/java/org/apache/commons/math3/random/ValueServer.java
Fri Dec 14 14:59:44 2012
@@ -98,15 +98,26 @@ public class ValueServer {
     }
 
     /**
-     * Construct a ValueServer instance using a RandomDataImpl as its source
+     * Construct a ValueServer instance using a RandomDataGenerator as its source
      * of random data.
      *
-     * @param randomData the RandomDataImpl instance used to source random data
+     * @param randomData random data source
      * @since 3.0
      */
     public ValueServer(RandomDataGenerator randomData) {
         this.randomData = randomData;
     }
+    /**
+     * Construct a ValueServer instance using a RandomDataImpl as its source
+     * of random data.
+     *
+     * @param randomData random data source
+     * @deprecated As of 3.1. Use {@link #ValueServer(RandomDataGenerator)} instead.
+     */
+    @Deprecated
+    public ValueServer(RandomDataImpl randomData) {
+        this(randomData.getDelegate());
+    }
 
     /**
      * Returns the next generated value, generated according



Mime
View raw message