[cvs] / jsr166 / src / main / java / util / SplittableRandom.java Repository:
ViewVC logotype

Diff of /jsr166/src/main/java/util/SplittableRandom.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.30, Sat Jan 2 02:27:03 2016 UTC revision 1.31, Fri Feb 19 03:39:15 2016 UTC
# Line 225  Line 225 
225      private static final AtomicLong defaultGen = new AtomicLong(initialSeed());      private static final AtomicLong defaultGen = new AtomicLong(initialSeed());
226    
227      private static long initialSeed() {      private static long initialSeed() {
228          java.security.PrivilegedAction<Boolean> action =          if (java.security.AccessController.doPrivileged(
229              () -> Boolean.getBoolean("java.util.secureRandomSeed");              new java.security.PrivilegedAction<Boolean>() {
230          if (java.security.AccessController.doPrivileged(action)) {                  public Boolean run() {
231                        return Boolean.getBoolean("java.util.secureRandomSeed");
232                    }})) {
233              byte[] seedBytes = java.security.SecureRandom.getSeed(8);              byte[] seedBytes = java.security.SecureRandom.getSeed(8);
234              long s = (long)seedBytes[0] & 0xffL;              long s = (long)seedBytes[0] & 0xffL;
235              for (int i = 1; i < 8; ++i)              for (int i = 1; i < 8; ++i)

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8