Skip to content

Commit 8dbc478

Browse files
committed
Update Random.java
1 parent 4f08269 commit 8dbc478

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/main/java/net/kite/internal/util/random/Random.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,6 @@ public long getSeed() {
4848
}
4949

5050
public long setRandomSeed() {
51-
Thread currentThread = Thread.currentThread();
52-
ThreadLocalRandom currentThreadRandom = ThreadLocalRandom.current();
53-
5451
long startSeed;
5552

5653
if(useSimpleStartSeedEntropy) {
@@ -59,6 +56,9 @@ public long setRandomSeed() {
5956

6057
} else {
6158

59+
Thread currentThread = Thread.currentThread();
60+
ThreadLocalRandom currentThreadRandom = ThreadLocalRandom.current();
61+
6262
long l1 = System.nanoTime();
6363
@SuppressWarnings("deprecation")
6464
long l2 = currentThread.getId() * START_SEED_THREAD_ID_MULTIPLIER;

0 commit comments

Comments
 (0)