JDK-8201634 : Random seedUniquifier uses incorrect LCG
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: 10,11
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2018-04-13
  • Updated: 2018-05-09
  • Resolved: 2018-05-02
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11
11 b12Fixed
Related Reports
Relates :  
Description
A DESCRIPTION OF THE PROBLEM :
The method java.util.Random.seedUniquifier() uses a Linear Congruential Generator constant that is commented to be taken from L'Ecuyer, "Tables of Linear Congruential Generators of Different Sizes and Good Lattice Structure", 1999.

The constant used in the code is 181783497276652981L. But according to the referenced document, Table 5 for m=2^64, the value should be 1181783497276652981L.



Comments
This has been raised before see the last comment on: https://bugs.openjdk.java.net/browse/JDK-6937857 It also has its own stack overflow page: http://stackoverflow.com/questions/18092160/whats-with-181783497276652981-and-8682522807148012-in-random-java-7 When talking with the relevant developers at the time we concluded it was a typo. It probably does not make much difference to add the 1 back, though we probably should just to avoid such repeated discussions.
17-04-2018