test/java/util/concurrent/FutureTask/CancelledFutureLoops.java

Print this page

        

@@ -32,11 +32,11 @@
  */
 
 /*
  * @test
  * @bug 4486658
- * @compile CancelledFutureLoops.java
+ * @compile -source 1.5 CancelledFutureLoops.java
  * @run main/timeout=2000 CancelledFutureLoops
  * @summary Checks for responsiveness of futures to cancellation.
  * Runs under the assumption that ITERS computations require more than
  * TIMEOUT msecs to complete.
  */

@@ -62,14 +62,14 @@
         for (int i = 2; i <= maxThreads; i += (i+1) >>> 1) {
             System.out.print("Threads: " + i);
             try {
                 new FutureLoop(i).test();
             }
-            catch(BrokenBarrierException bb) {
+            catch (BrokenBarrierException bb) {
                 // OK; ignore
             }
-            catch(ExecutionException ee) {
+            catch (ExecutionException ee) {
                 // OK; ignore
             }
             Thread.sleep(TIMEOUT);
         }
         pool.shutdown();