Author: nextgens
Date: 2008-03-25 15:13:36 +0000 (Tue, 25 Mar 2008)
New Revision: 18781
Modified:
trunk/freenet/src/org/spaceroots/mantissa/random/MersenneTwister.java
Log:
Second part of r18554, hopefully fix #2169 for real
Modified: trunk/freenet/src/org/spaceroots/mantissa/random/MersenneTwister.java
===================================================================
--- trunk/freenet/src/org/spaceroots/mantissa/random/MersenneTwister.java
2008-03-25 14:14:14 UTC (rev 18780)
+++ trunk/freenet/src/org/spaceroots/mantissa/random/MersenneTwister.java
2008-03-25 15:13:36 UTC (rev 18781)
@@ -165,6 +165,12 @@
* the seed of the generator will be related to the current time
*/
public synchronized void setSeed(int[] seed) {
+ if (mt == null) {
+ // this is probably a spurious call from base class
constructor,
+ // we do nothing and wait for the setSeed in our own
+ // constructors after array allocation
+ return;
+ }
if (seed == null) {
setSeed(System.currentTimeMillis());
return;