changeset 50479:deefa2120bc4

8201634: Random seedUniquifier uses incorrect LCG Summary: Correct typo in constant from L'Ecuyer Reviewed-by: dl, psandoz
author martin
date Wed, 02 May 2018 11:20:20 -0700
parents a17d59ffca47
children ea246151be08
files src/java.base/share/classes/java/util/Random.java
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/util/Random.java	Wed May 02 11:19:12 2018 -0700
+++ b/src/java.base/share/classes/java/util/Random.java	Wed May 02 11:20:20 2018 -0700
@@ -110,7 +110,7 @@
         // Different Sizes and Good Lattice Structure", 1999
         for (;;) {
             long current = seedUniquifier.get();
-            long next = current * 181783497276652981L;
+            long next = current * 1181783497276652981L;
             if (seedUniquifier.compareAndSet(current, next))
                 return next;
         }