# | Line 51 | Line 51 | import sun.misc.Unsafe; | |
---|---|---|
51 | * Many applications will find the method {@link Math#random} simpler to use. | |
52 | * | |
53 | * @author Frank Yellin | |
54 | – | * @version %I%, %G% |
54 | * @since 1.0 | |
55 | */ | |
56 | public | |
# | Line 505 | Line 504 | class Random implements java.io.Serializ | |
504 | ||
505 | // The seed is read in as {@code long} for | |
506 | // historical reasons, but it is converted to an AtomicLong. | |
507 | < | long seedVal = (long) fields.get("seed", -1L); |
507 | > | long seedVal = fields.get("seed", -1L); |
508 | if (seedVal < 0) | |
509 | throw new java.io.StreamCorruptedException( | |
510 | "Random: invalid seed"); |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |