ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jdk7/java/util/Random.java
(Generate patch)

Comparing jsr166/src/jdk7/java/util/Random.java (file contents):
Revision 1.1 by dl, Sun Dec 16 20:55:09 2012 UTC vs.
Revision 1.2 by jsr166, Fri Jan 18 04:23:27 2013 UTC

# Line 150 | Line 150 | class Random implements java.io.Serializ
150       *
151       * @param seed the initial seed
152       */
153 <    synchronized public void setSeed(long seed) {
153 >    public synchronized void setSeed(long seed) {
154          this.seed.set(initialScramble(seed));
155          haveNextNextGaussian = false;
156      }
# Line 493 | Line 493 | class Random implements java.io.Serializ
493       *         standard deviation {@code 1.0} from this random number
494       *         generator's sequence
495       */
496 <    synchronized public double nextGaussian() {
496 >    public synchronized double nextGaussian() {
497          // See Knuth, ACP, Section 3.4.1 Algorithm C.
498          if (haveNextNextGaussian) {
499              haveNextNextGaussian = false;
# Line 551 | Line 551 | class Random implements java.io.Serializ
551      /**
552       * Save the {@code Random} instance to a stream.
553       */
554 <    synchronized private void writeObject(ObjectOutputStream s)
554 >    private synchronized void writeObject(ObjectOutputStream s)
555          throws IOException {
556  
557          // set the values of the Serializable fields

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines