commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From l..@apache.org
Subject svn commit: r611495 - in /commons/proper/math/trunk/src: java/org/apache/commons/math/random/RandomGenerator.java test/org/apache/commons/math/random/RandomAdaptorTest.java test/org/apache/commons/math/random/TestRandomGenerator.java
Date Sat, 12 Jan 2008 22:01:01 GMT
Author: luc
Date: Sat Jan 12 14:01:00 2008
New Revision: 611495

URL: http://svn.apache.org/viewvc?rev=611495&view=rev
Log:
RandomGenerator classes should be Serializable
since they are used as fields of both Serializable RandomAdaptor
and RandomDataImpl classes

Modified:
    commons/proper/math/trunk/src/java/org/apache/commons/math/random/RandomGenerator.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomAdaptorTest.java
    commons/proper/math/trunk/src/test/org/apache/commons/math/random/TestRandomGenerator.java

Modified: commons/proper/math/trunk/src/java/org/apache/commons/math/random/RandomGenerator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/java/org/apache/commons/math/random/RandomGenerator.java?rev=611495&r1=611494&r2=611495&view=diff
==============================================================================
--- commons/proper/math/trunk/src/java/org/apache/commons/math/random/RandomGenerator.java
(original)
+++ commons/proper/math/trunk/src/java/org/apache/commons/math/random/RandomGenerator.java
Sat Jan 12 14:01:00 2008
@@ -16,6 +16,8 @@
  */
 package org.apache.commons.math.random;
 
+import java.io.Serializable;
+
 /**
  * Interface extracted from <code>java.util.Random</code>.  This interface is
  * implemented by {@link AbstractRandomGenerator}.  
@@ -23,7 +25,7 @@
  * @since 1.1
  * @version $Revision:$ $Date$
  */
-public interface RandomGenerator {
+public interface RandomGenerator extends Serializable {
     
     /**
      * Sets the seed of the underyling random number generator using a 

Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomAdaptorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomAdaptorTest.java?rev=611495&r1=611494&r2=611495&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomAdaptorTest.java
(original)
+++ commons/proper/math/trunk/src/test/org/apache/commons/math/random/RandomAdaptorTest.java
Sat Jan 12 14:01:00 2008
@@ -67,6 +67,8 @@
      */
     private static class ConstantGenerator implements RandomGenerator {
         
+        private static final long serialVersionUID = 5936262220824971138L;
+
         public boolean nextBoolean() {
             return false;
         }

Modified: commons/proper/math/trunk/src/test/org/apache/commons/math/random/TestRandomGenerator.java
URL: http://svn.apache.org/viewvc/commons/proper/math/trunk/src/test/org/apache/commons/math/random/TestRandomGenerator.java?rev=611495&r1=611494&r2=611495&view=diff
==============================================================================
--- commons/proper/math/trunk/src/test/org/apache/commons/math/random/TestRandomGenerator.java
(original)
+++ commons/proper/math/trunk/src/test/org/apache/commons/math/random/TestRandomGenerator.java
Sat Jan 12 14:01:00 2008
@@ -25,6 +25,8 @@
  * @version $Revision:$ $Date$
  */
 public class TestRandomGenerator extends AbstractRandomGenerator {
+
+    private static final long serialVersionUID = -9161426374178114548L;
     private Random random = new Random();
     
     public void setSeed(long seed) {



Mime
View raw message