changeset 9311:2f85b69d1d3f

8022852: Fix serial javac warnings in ArrayPrefixHelpers Reviewed-by: chegar Contributed-by: Martin Buchholz <martinrb@google.com>
author chegar
date Thu, 20 Feb 2014 12:16:28 +0000
parents 1ec442032113
children e5a09bc70308
files src/share/classes/java/util/ArrayPrefixHelpers.java
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/java/util/ArrayPrefixHelpers.java	Thu Feb 20 11:47:22 2014 +0100
+++ b/src/share/classes/java/util/ArrayPrefixHelpers.java	Thu Feb 20 12:16:28 2014 +0000
@@ -128,7 +128,6 @@
             this.lo = lo; this.hi = hi;
         }
 
-        @SuppressWarnings("unchecked")
         public final void compute() {
             final BinaryOperator<T> fn;
             final T[] a;
@@ -142,9 +141,9 @@
                     if (lt == null) {                // first pass
                         int mid = (l + h) >>> 1;
                         f = rt = t.right =
-                                new CumulateTask<>(t, fn, a, org, fnc, th, mid, h);
+                                new CumulateTask<T>(t, fn, a, org, fnc, th, mid, h);
                         t = lt = t.left  =
-                                new CumulateTask<>(t, fn, a, org, fnc, th, l, mid);
+                                new CumulateTask<T>(t, fn, a, org, fnc, th, l, mid);
                     }
                     else {                           // possibly refork
                         T pin = t.in;
@@ -213,7 +212,9 @@
                         sum = t.in;
                     t.out = sum;
                     for (CumulateTask<T> par;;) {             // propagate
-                        if ((par = (CumulateTask<T>)t.getCompleter()) == null) {
+                        @SuppressWarnings("unchecked") CumulateTask<T> partmp
+                            = (CumulateTask<T>)t.getCompleter();
+                        if ((par = partmp) == null) {
                             if ((state & FINISHED) != 0)      // enable join
                                 t.quietlyComplete();
                             break outer;
@@ -245,6 +246,7 @@
                 }
             }
         }
+        private static final long serialVersionUID = 5293554502939613543L;
     }
 
     static final class LongCumulateTask extends CountedCompleter<Void> {
@@ -394,6 +396,7 @@
                 }
             }
         }
+        private static final long serialVersionUID = -5074099945909284273L;
     }
 
     static final class DoubleCumulateTask extends CountedCompleter<Void> {
@@ -543,6 +546,7 @@
                 }
             }
         }
+        private static final long serialVersionUID = -586947823794232033L;
     }
 
     static final class IntCumulateTask extends CountedCompleter<Void> {
@@ -692,5 +696,6 @@
                 }
             }
         }
+        private static final long serialVersionUID = 3731755594596840961L;
     }
 }