Fix issue with use of SecureRandom for id generation
Switch to using nextBytes as generateSeed doesn't seem to be always supported by all hardware providers. Issue: SPR-11278
This commit is contained in:
@@ -36,7 +36,9 @@ public class AlternativeJdkIdGenerator implements IdGenerator {
|
||||
|
||||
|
||||
public AlternativeJdkIdGenerator() {
|
||||
byte[] seed = new SecureRandom().generateSeed(8);
|
||||
SecureRandom secureRandom = new SecureRandom();
|
||||
byte[] seed = new byte[8];
|
||||
secureRandom.nextBytes(seed);
|
||||
this.random = new Random(new BigInteger(seed).longValue());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user