On Tue, Jun 28, 2016 at 5:55 AM, Paul Sandoz <paul.san...@oracle.com> wrote:

>
>
> CompletableFutureTest
> —
>
> 3383     public void testRejectingExecutor() {
> 3384         for (Integer v : new Integer[] { 1, null }) {
> 3385
> 3386         final CountingRejectingExecutor e = new
> CountingRejectingExecutor();
>
>
> 3473     public void testRejectingExecutorNeverInvoked() {
> 3474         final CountingRejectingExecutor e = new
> CountingRejectingExecutor();
> 3475
> 3476         for (Integer v : new Integer[] { 1, null }) {
> 3477
> 3478         final CompletableFuture<Integer> complete =
> CompletableFuture.completedFuture(v);
>
> No indent for code within the for loop block
>
>
This test class uses Weird Indentation intentionally.  But more locally
regular like this:

--- src/test/tck/CompletableFutureTest.java 27 Jun 2016 21:41:17 -0000 1.160
+++ src/test/tck/CompletableFutureTest.java 28 Jun 2016 14:46:25 -0000
@@ -3354,8 +3354,8 @@
      * Test submissions to an executor that rejects all tasks.
      */
     public void testRejectingExecutor() {
-        for (Integer v : new Integer[] { 1, null }) {
-
+        for (Integer v : new Integer[] { 1, null })
+    {
         final CountingRejectingExecutor e = new
CountingRejectingExecutor();

         final CompletableFuture<Integer> complete =
CompletableFuture.completedFuture(v);
@@ -3434,9 +3434,7 @@
             checkCompletedWithWrappedException(future, e.ex);

         assertEquals(futures.size(), e.count.get());
-
-        }
-    }
+    }}

     /**
      * Test submissions to an executor that rejects all tasks, but
@@ -3444,10 +3442,10 @@
      * explicitly completed.
      */
     public void testRejectingExecutorNeverInvoked() {
+        for (Integer v : new Integer[] { 1, null })
+    {
         final CountingRejectingExecutor e = new
CountingRejectingExecutor();

-        for (Integer v : new Integer[] { 1, null }) {
-
         final CompletableFuture<Integer> complete =
CompletableFuture.completedFuture(v);
         final CompletableFuture<Integer> incomplete = new
CompletableFuture<>();

@@ -3495,9 +3493,7 @@
             checkCompletedNormally(future, null);

         assertEquals(0, e.count.get());
-
-        }
-    }
+    }}

     /**
      * toCompletableFuture returns this CompletableFuture.


>
> 2257      * @param saturate if nonnull, a predicate invoked upon attempts
>
> s/nonnull/non-null
>
>
Done.

Index: src/main/java/util/concurrent/ForkJoinPool.java
===================================================================
RCS file:
/export/home/jsr166/jsr166/jsr166/src/main/java/util/concurrent/ForkJoinPool.java,v
retrieving revision 1.317
diff -u -r1.317 ForkJoinPool.java
--- src/main/java/util/concurrent/ForkJoinPool.java 17 Jun 2016 13:03:45
-0000 1.317
+++ src/main/java/util/concurrent/ForkJoinPool.java 28 Jun 2016 14:41:28
-0000
@@ -2225,7 +2225,7 @@
      * acceptable when submitted tasks cannot have dependencies
      * requiring additional threads.
      *
-     * @param saturate if nonnull, a predicate invoked upon attempts
+     * @param saturate if non-null, a predicate invoked upon attempts
      * to create more than the maximum total allowed threads.  By
      * default, when a thread is about to block on a join or {@link
      * ManagedBlocker}, but cannot be replaced because the
Index: src/main/java/util/concurrent/locks/StampedLock.java
===================================================================
RCS file:
/export/home/jsr166/jsr166/jsr166/src/main/java/util/concurrent/locks/StampedLock.java,v
retrieving revision 1.61
diff -u -r1.61 StampedLock.java
--- src/main/java/util/concurrent/locks/StampedLock.java 17 Jun 2016
13:03:20 -0000 1.61
+++ src/main/java/util/concurrent/locks/StampedLock.java 28 Jun 2016
14:41:28 -0000
@@ -1310,7 +1310,7 @@
      * AbstractQueuedSynchronizer (see its detailed explanation in AQS
      * internal documentation).
      *
-     * @param node if nonnull, the waiter
+     * @param node if non-null, the waiter
      * @param group either node or the group node is cowaiting with
      * @param interrupted if already interrupted
      * @return INTERRUPTED if interrupted or Thread.interrupted, else zero

Reply via email to