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:
parent
3b14e974f8
commit
1f49f994e6
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue