Apache Lucene open-source search software
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())"
Steven Rowe1e4ece5fbde9
diff --git a/lucene/replicator/src/test/org/apache/lucene/replicator/ReplicatorTestCase.java b/lucene/replicator/src/test/org/apache/lucene/replicator/ReplicatorTestCase.javaindex f381e91892f..2de42ad33ea 100755--- a/lucene/replicator/src/test/org/apache/lucene/replicator/ReplicatorTestCase.java+++ b/lucene/replicator/src/test/org/apache/lucene/replicator/ReplicatorTestCase.java@@ -118,7 +118,7 @@ public abstract class ReplicatorTestCase extends LuceneTestCase {}server.setConnectors(new Connector[] {connector});- server.setSessionIdManager(new HashSessionIdManager(new Random()));+ server.setSessionIdManager(new HashSessionIdManager(new Random(random().nextLong())));server.start();