--- jsr166/src/test/tck/AtomicLongFieldUpdaterTest.java 2009/11/02 20:28:31 1.10 +++ jsr166/src/test/tck/AtomicLongFieldUpdaterTest.java 2009/11/16 04:57:10 1.11 @@ -26,7 +26,7 @@ public class AtomicLongFieldUpdaterTest * Construction with non-existent field throws RuntimeException */ public void testConstructor(){ - try{ + try { AtomicLongFieldUpdater a = AtomicLongFieldUpdater.newUpdater (AtomicLongFieldUpdaterTest.class, "y"); @@ -39,7 +39,7 @@ public class AtomicLongFieldUpdaterTest * construction with field not of given type throws RuntimeException */ public void testConstructor2(){ - try{ + try { AtomicLongFieldUpdater a = AtomicLongFieldUpdater.newUpdater (AtomicLongFieldUpdaterTest.class, "z"); @@ -52,7 +52,7 @@ public class AtomicLongFieldUpdaterTest * construction with non-volatile field throws RuntimeException */ public void testConstructor3(){ - try{ + try { AtomicLongFieldUpdater a = AtomicLongFieldUpdater.newUpdater (AtomicLongFieldUpdaterTest.class, "w"); @@ -135,7 +135,7 @@ public class AtomicLongFieldUpdaterTest Thread t = new Thread(new Runnable() { public void run() { - while(!a.compareAndSet(AtomicLongFieldUpdaterTest.this, 2, 3)) Thread.yield(); + while (!a.compareAndSet(AtomicLongFieldUpdaterTest.this, 2, 3)) Thread.yield(); }}); try { t.start(); @@ -144,7 +144,7 @@ public class AtomicLongFieldUpdaterTest assertFalse(t.isAlive()); assertEquals(a.get(this), 3); } - catch(Exception e) { + catch (Exception e) { unexpectedException(); } } @@ -161,10 +161,10 @@ public class AtomicLongFieldUpdaterTest return; } x = 1; - while(!a.weakCompareAndSet(this,1,2)); - while(!a.weakCompareAndSet(this,2,-4)); + while (!a.weakCompareAndSet(this,1,2)); + while (!a.weakCompareAndSet(this,2,-4)); assertEquals(-4,a.get(this)); - while(!a.weakCompareAndSet(this,-4,7)); + while (!a.weakCompareAndSet(this,-4,7)); assertEquals(7,a.get(this)); }