You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ba...@apache.org on 2003/05/07 21:14:01 UTC

cvs commit: jakarta-commons/lang/src/java/org/apache/commons/lang/math JVMRandom.java

bayard      2003/05/07 12:14:01

  Modified:    lang/src/java/org/apache/commons/lang/math JVMRandom.java
  Log:
  Empty constructor stops it calling setSeed in Random's empty constructor.
  
  Revision  Changes    Path
  1.2       +6 -1      jakarta-commons/lang/src/java/org/apache/commons/lang/math/JVMRandom.java
  
  Index: JVMRandom.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/lang/src/java/org/apache/commons/lang/math/JVMRandom.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- JVMRandom.java	7 May 2003 15:09:19 -0000	1.1
  +++ JVMRandom.java	7 May 2003 19:14:01 -0000	1.2
  @@ -66,6 +66,11 @@
    */
   public final class JVMRandom extends Random {
   
  +    // important to not call super() as this will 
  +    // call setSeed with the current Time
  +    public JVMRandom() {
  +    }
  +    
       public synchronized void setSeed(long seed) {
           throw new UnsupportedOperationException();
       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org