lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sar...@apache.org
Subject svn commit: r1481973 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/replicator/ lucene/replicator/src/test/org/apache/lucene/replicator/ReplicatorTestCase.java
Date Mon, 13 May 2013 17:05:41 GMT
Author: sarowe
Date: Mon May 13 17:05:41 2013
New Revision: 1481973

URL: http://svn.apache.org/r1481973
Log:
LUCENE-4975: make forbidden-apis shut up: "new Random()" is bad, and LTC.random() says "RandomizedRunner
prevents changing the seed of its random generators to assure repeatability of tests. If you
need a mutable instance of Random, create a new instance, preferably with the initial seed
aquired from this Random instance.", so switched to "new Random(random.nextLong())" (merged
trunk r1481971)

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/replicator/   (props changed)
    lucene/dev/branches/branch_4x/lucene/replicator/src/test/org/apache/lucene/replicator/ReplicatorTestCase.java

Modified: lucene/dev/branches/branch_4x/lucene/replicator/src/test/org/apache/lucene/replicator/ReplicatorTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/replicator/src/test/org/apache/lucene/replicator/ReplicatorTestCase.java?rev=1481973&r1=1481972&r2=1481973&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/replicator/src/test/org/apache/lucene/replicator/ReplicatorTestCase.java
(original)
+++ lucene/dev/branches/branch_4x/lucene/replicator/src/test/org/apache/lucene/replicator/ReplicatorTestCase.java
Mon May 13 17:05:41 2013
@@ -118,7 +118,7 @@ public abstract class ReplicatorTestCase
     }
     
     server.setConnectors(new Connector[] {connector});
-    server.setSessionIdManager(new HashSessionIdManager(new Random()));
+    server.setSessionIdManager(new HashSessionIdManager(new Random(random().nextLong())));
     
     server.start();
     



Mime
View raw message