Mercurial > hg > icedtea7-forest > jdk
changeset 9113:c7ab4ccefe87
8021417: Fix doclint issues in java.util.concurrent
Reviewed-by: chegar, lancea
Contributed-by: Doug Lea <dl@cs.oswego.edu>
line wrap: on
line diff
--- a/src/share/classes/java/util/concurrent/AbstractExecutorService.java Thu Feb 02 06:14:01 2017 +0000 +++ b/src/share/classes/java/util/concurrent/AbstractExecutorService.java Thu Feb 02 07:54:20 2017 +0000 @@ -76,6 +76,7 @@ * * @param runnable the runnable task being wrapped * @param value the default value for the returned future + * @param <T> the type of the given value * @return a <tt>RunnableFuture</tt> which when run will run the * underlying runnable and which, as a <tt>Future</tt>, will yield * the given value as its result and provide for cancellation of @@ -90,6 +91,7 @@ * Returns a <tt>RunnableFuture</tt> for the given callable task. * * @param callable the callable task being wrapped + * @param <T> the type of the callable's result * @return a <tt>RunnableFuture</tt> which when run will call the * underlying callable and which, as a <tt>Future</tt>, will yield * the callable's result as its result and provide for
--- a/src/share/classes/java/util/concurrent/ExecutorService.java Thu Feb 02 06:14:01 2017 +0000 +++ b/src/share/classes/java/util/concurrent/ExecutorService.java Thu Feb 02 07:54:20 2017 +0000 @@ -232,6 +232,7 @@ * {@link Callable} form so they can be submitted. * * @param task the task to submit + * @param <T> the type of the task's result * @return a Future representing pending completion of the task * @throws RejectedExecutionException if the task cannot be * scheduled for execution @@ -246,6 +247,7 @@ * * @param task the task to submit * @param result the result to return + * @param <T> the type of the result * @return a Future representing pending completion of the task * @throws RejectedExecutionException if the task cannot be * scheduled for execution @@ -277,6 +279,7 @@ * collection is modified while this operation is in progress. * * @param tasks the collection of tasks + * @param <T> the type of the values returned from the tasks * @return A list of Futures representing the tasks, in the same * sequential order as produced by the iterator for the * given task list, each of which has completed. @@ -305,6 +308,7 @@ * @param tasks the collection of tasks * @param timeout the maximum time to wait * @param unit the time unit of the timeout argument + * @param <T> the type of the values returned from the tasks * @return a list of Futures representing the tasks, in the same * sequential order as produced by the iterator for the * given task list. If the operation did not time out, @@ -330,6 +334,7 @@ * collection is modified while this operation is in progress. * * @param tasks the collection of tasks + * @param <T> the type of the values returned from the tasks * @return the result returned by one of the tasks * @throws InterruptedException if interrupted while waiting * @throws NullPointerException if tasks or any element task @@ -354,6 +359,7 @@ * @param tasks the collection of tasks * @param timeout the maximum time to wait * @param unit the time unit of the timeout argument + * @param <T> the type of the values returned from the tasks * @return the result returned by one of the tasks. * @throws InterruptedException if interrupted while waiting * @throws NullPointerException if tasks, or unit, or any element
--- a/src/share/classes/java/util/concurrent/Executors.java Thu Feb 02 06:14:01 2017 +0000 +++ b/src/share/classes/java/util/concurrent/Executors.java Thu Feb 02 07:54:20 2017 +0000 @@ -360,6 +360,7 @@ * <tt>Callable</tt> to an otherwise resultless action. * @param task the task to run * @param result the result to return + * @param <T> the type of the result * @return a callable object * @throws NullPointerException if task null */ @@ -421,6 +422,7 @@ * not possible, throw an associated {@link * AccessControlException}. * @param callable the underlying task + * @param <T> the type of the callable's result * @return a callable object * @throws NullPointerException if callable null * @@ -442,7 +444,7 @@ * not possible, throw an associated {@link * AccessControlException}. * @param callable the underlying task - * + * @param <T> the type of the callable's result * @return a callable object * @throws NullPointerException if callable null * @throws AccessControlException if the current access control
--- a/src/share/classes/java/util/concurrent/ForkJoinPool.java Thu Feb 02 06:14:01 2017 +0000 +++ b/src/share/classes/java/util/concurrent/ForkJoinPool.java Thu Feb 02 07:54:20 2017 +0000 @@ -375,6 +375,7 @@ * Returns a new worker thread operating in the given pool. * * @param pool the pool this thread works in + * @return the new worker thread * @throws NullPointerException if the pool is null */ public ForkJoinWorkerThread newThread(ForkJoinPool pool); @@ -1502,6 +1503,7 @@ * minimally only the latter. * * @param task the task + * @param <T> the type of the task's result * @return the task's result * @throws NullPointerException if the task is null * @throws RejectedExecutionException if the task cannot be @@ -1574,6 +1576,7 @@ * Submits a ForkJoinTask for execution. * * @param task the task to submit + * @param <T> the type of the task's result * @return the task * @throws NullPointerException if the task is null * @throws RejectedExecutionException if the task cannot be
--- a/src/share/classes/java/util/concurrent/ForkJoinTask.java Thu Feb 02 06:14:01 2017 +0000 +++ b/src/share/classes/java/util/concurrent/ForkJoinTask.java Thu Feb 02 07:54:20 2017 +0000 @@ -754,6 +754,7 @@ * ClassCastException}. * * @param tasks the collection of tasks + * @param <T> the type of the values returned from the tasks * @return the tasks argument, to simplify usage * @throws NullPointerException if tasks or any element are null */ @@ -1318,6 +1319,7 @@ * * @param runnable the runnable action * @param result the result upon completion + * @param <T> the type of the result * @return the task */ public static <T> ForkJoinTask<T> adapt(Runnable runnable, T result) { @@ -1331,6 +1333,7 @@ * encountered into {@code RuntimeException}. * * @param callable the callable action + * @param <T> the type of the callable's result * @return the task */ public static <T> ForkJoinTask<T> adapt(Callable<? extends T> callable) { @@ -1344,6 +1347,8 @@ /** * Saves the state to a stream (that is, serializes it). * + * @param s the stream + * @throws java.io.IOException if an I/O error occurs * @serialData the current run status and the exception thrown * during execution, or {@code null} if none * @param s the stream @@ -1358,6 +1363,9 @@ * Reconstitutes the instance from a stream (that is, deserializes it). * * @param s the stream + * @throws ClassNotFoundException if the class of a serialized object + * could not be found + * @throws java.io.IOException if an I/O error occurs */ private void readObject(java.io.ObjectInputStream s) throws java.io.IOException, ClassNotFoundException {
--- a/src/share/classes/java/util/concurrent/ScheduledExecutorService.java Thu Feb 02 06:14:01 2017 +0000 +++ b/src/share/classes/java/util/concurrent/ScheduledExecutorService.java Thu Feb 02 07:54:20 2017 +0000 @@ -119,6 +119,7 @@ * @param callable the function to execute * @param delay the time from now to delay execution * @param unit the time unit of the delay parameter + * @param <V> the type of the callable's result * @return a ScheduledFuture that can be used to extract result or cancel * @throws RejectedExecutionException if the task cannot be * scheduled for execution
--- a/src/share/classes/java/util/concurrent/ScheduledThreadPoolExecutor.java Thu Feb 02 06:14:01 2017 +0000 +++ b/src/share/classes/java/util/concurrent/ScheduledThreadPoolExecutor.java Thu Feb 02 07:54:20 2017 +0000 @@ -391,6 +391,7 @@ * * @param runnable the submitted Runnable * @param task the task created to execute the runnable + * @param <V> the type of the task's result * @return a task that can execute the runnable * @since 1.6 */ @@ -407,6 +408,7 @@ * * @param callable the submitted Callable * @param task the task created to execute the callable + * @param <V> the type of the task's result * @return a task that can execute the callable * @since 1.6 */
--- a/src/share/classes/java/util/concurrent/TimeUnit.java Thu Feb 02 06:14:01 2017 +0000 +++ b/src/share/classes/java/util/concurrent/TimeUnit.java Thu Feb 02 07:54:20 2017 +0000 @@ -69,6 +69,9 @@ * @author Doug Lea */ public enum TimeUnit { + /** + * Time unit representing one thousandth of a microsecond + */ NANOSECONDS { public long toNanos(long d) { return d; } public long toMicros(long d) { return d/(C1/C0); } @@ -80,6 +83,10 @@ public long convert(long d, TimeUnit u) { return u.toNanos(d); } int excessNanos(long d, long m) { return (int)(d - (m*C2)); } }, + + /** + * Time unit representing one thousandth of a millisecond + */ MICROSECONDS { public long toNanos(long d) { return x(d, C1/C0, MAX/(C1/C0)); } public long toMicros(long d) { return d; } @@ -91,6 +98,10 @@ public long convert(long d, TimeUnit u) { return u.toMicros(d); } int excessNanos(long d, long m) { return (int)((d*C1) - (m*C2)); } }, + + /** + * Time unit representing one thousandth of a second + */ MILLISECONDS { public long toNanos(long d) { return x(d, C2/C0, MAX/(C2/C0)); } public long toMicros(long d) { return x(d, C2/C1, MAX/(C2/C1)); } @@ -102,6 +113,10 @@ public long convert(long d, TimeUnit u) { return u.toMillis(d); } int excessNanos(long d, long m) { return 0; } }, + + /** + * Time unit representing one second + */ SECONDS { public long toNanos(long d) { return x(d, C3/C0, MAX/(C3/C0)); } public long toMicros(long d) { return x(d, C3/C1, MAX/(C3/C1)); } @@ -113,6 +128,10 @@ public long convert(long d, TimeUnit u) { return u.toSeconds(d); } int excessNanos(long d, long m) { return 0; } }, + + /** + * Time unit representing sixty seconds + */ MINUTES { public long toNanos(long d) { return x(d, C4/C0, MAX/(C4/C0)); } public long toMicros(long d) { return x(d, C4/C1, MAX/(C4/C1)); } @@ -124,6 +143,10 @@ public long convert(long d, TimeUnit u) { return u.toMinutes(d); } int excessNanos(long d, long m) { return 0; } }, + + /** + * Time unit representing sixty minutes + */ HOURS { public long toNanos(long d) { return x(d, C5/C0, MAX/(C5/C0)); } public long toMicros(long d) { return x(d, C5/C1, MAX/(C5/C1)); } @@ -135,6 +158,10 @@ public long convert(long d, TimeUnit u) { return u.toHours(d); } int excessNanos(long d, long m) { return 0; } }, + + /** + * Time unit representing twenty four hours + */ DAYS { public long toNanos(long d) { return x(d, C6/C0, MAX/(C6/C0)); } public long toMicros(long d) { return x(d, C6/C1, MAX/(C6/C1)); }
--- a/src/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java Thu Feb 02 06:14:01 2017 +0000 +++ b/src/share/classes/java/util/concurrent/atomic/AtomicIntegerFieldUpdater.java Thu Feb 02 07:54:20 2017 +0000 @@ -71,6 +71,7 @@ * * @param tclass the class of the objects holding the field * @param fieldName the name of the field to be updated + * @param <U> the type of instances of tclass * @return the updater * @throws IllegalArgumentException if the field is not a * volatile integer type
--- a/src/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java Thu Feb 02 06:14:01 2017 +0000 +++ b/src/share/classes/java/util/concurrent/atomic/AtomicLongFieldUpdater.java Thu Feb 02 07:54:20 2017 +0000 @@ -71,6 +71,7 @@ * * @param tclass the class of the objects holding the field * @param fieldName the name of the field to be updated. + * @param <U> the type of instances of tclass * @return the updater * @throws IllegalArgumentException if the field is not a * volatile long type.
--- a/src/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java Thu Feb 02 06:14:01 2017 +0000 +++ b/src/share/classes/java/util/concurrent/atomic/AtomicReferenceFieldUpdater.java Thu Feb 02 07:54:20 2017 +0000 @@ -91,6 +91,8 @@ * @param tclass the class of the objects holding the field. * @param vclass the class of the field * @param fieldName the name of the field to be updated. + * @param <U> the type of instances of tclass + * @param <W> the type of instances of vclass * @return the updater * @throws IllegalArgumentException if the field is not a volatile reference type. * @throws RuntimeException with a nested reflection-based