ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/jtreg/util/Vector/SyncLastIndexOf.java
(Generate patch)

Comparing jsr166/src/test/jtreg/util/Vector/SyncLastIndexOf.java (file contents):
Revision 1.2 by jsr166, Sun Sep 5 21:32:20 2010 UTC vs.
Revision 1.5 by jsr166, Mon Jan 8 03:12:03 2018 UTC

# Line 27 | Line 27
27   * @summary Vector's lastIndexOf(Object) was lacking synchronization
28   * @author Konstantin Kladko
29   */
30 < import java.util.*;
30 >
31 > import java.util.Vector;
32  
33   public class SyncLastIndexOf {
34  
# Line 36 | Line 37 | public class SyncLastIndexOf {
37      static class RemovingThread extends Thread {
38  
39          public void run() {
40 <           synchronized(v) {
40 >           synchronized (v) {
41                  try {
42                  sleep(200);
43                  } catch (InterruptedException e) {
# Line 46 | Line 47 | public class SyncLastIndexOf {
47          }
48      }
49  
50 <    public static void main(String args[]) {
50 >    public static void main(String[] args) {
51          Integer x = new Integer(1);
52          v.addElement(x);
53          new RemovingThread().start();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines