test/java/util/concurrent/locks/ReentrantLock/CancelledLockLoops.java
Print this page
@@ -32,11 +32,11 @@
*/
/*
* @test
* @bug 4486658
- * @compile CancelledLockLoops.java
+ * @compile -source 1.5 CancelledLockLoops.java
* @run main/timeout=2800 CancelledLockLoops
* @summary tests lockInterruptibly.
* Checks for responsiveness of locks to interrupts. Runs under that
* assumption that ITERS_VALUE computations require more than TIMEOUT
* msecs to complete.
@@ -62,11 +62,11 @@
for (int i = 2; i <= maxThreads; i += (i+1) >>> 1) {
System.out.print("Threads: " + i);
try {
new ReentrantLockLoop(i).test();
}
- catch(BrokenBarrierException bb) {
+ catch (BrokenBarrierException bb) {
// OK, ignore
}
Thread.sleep(TIMEOUT);
}
}