Skip to content

Commit

Permalink
add back constructor with supplier argument
Browse files Browse the repository at this point in the history
  • Loading branch information
stefan-aws committed Feb 21, 2024
1 parent efa003f commit fbd3f5e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/interop/java/Full/Random.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ public Random() {
this.rng = ThreadLocal.withInitial(Random::createSecureRandom);
}

public Random(Supplier<SecureRandom> supplier) {
this.rng = ThreadLocal.withInitial(supplier);
}

private static final SecureRandom createSecureRandom() {
final SecureRandom rng = new SecureRandom();
// Required for proper initialization
Expand Down

0 comments on commit fbd3f5e

Please sign in to comment.