--- jsr166/src/jsr166y/ForkJoinTask.java 2009/07/26 17:33:37 1.22 +++ jsr166/src/jsr166y/ForkJoinTask.java 2009/07/27 20:57:44 1.23 @@ -652,19 +652,19 @@ public abstract class ForkJoinTask im } /** - * Returns true if the computation performed by this task has - * completed (or has been cancelled). + * Returns {@code true} if the computation performed by this task + * has completed (or has been cancelled). * - * @return true if this computation has completed + * @return {@code true} if this computation has completed */ public final boolean isDone() { return status < 0; } /** - * Returns true if this task was cancelled. + * Returns {@code true} if this task was cancelled. * - * @return true if this task was cancelled + * @return {@code true} if this task was cancelled */ public final boolean isCancelled() { return (status & COMPLETION_MASK) == CANCELLED; @@ -695,7 +695,7 @@ public abstract class ForkJoinTask im * default implementation because tasks are not in general * cancelled via interruption * - * @return true if this task is now cancelled + * @return {@code true} if this task is now cancelled */ public boolean cancel(boolean mayInterruptIfRunning) { setCompletion(CANCELLED); @@ -703,9 +703,9 @@ public abstract class ForkJoinTask im } /** - * Returns true if this task threw an exception or was cancelled. + * Returns {@code true} if this task threw an exception or was cancelled. * - * @return true if this task threw an exception or was cancelled + * @return {@code true} if this task threw an exception or was cancelled */ public final boolean isCompletedAbnormally() { return (status & COMPLETION_MASK) < NORMAL; @@ -716,7 +716,7 @@ public abstract class ForkJoinTask im * CancellationException if cancelled, or null if none or if the * method has not yet completed. * - * @return the exception, or null if none + * @return the exception, or {@code null} if none */ public final Throwable getException() { int s = status & COMPLETION_MASK; @@ -879,7 +879,7 @@ public abstract class ForkJoinTask im * Returns the pool hosting the current task execution, or null * if this task is executing outside of any ForkJoinPool. * - * @return the pool, or null if none + * @return the pool, or {@code null} if none */ public static ForkJoinPool getPool() { Thread t = Thread.currentThread(); @@ -910,7 +910,7 @@ public abstract class ForkJoinTask im * result in exceptions or errors, possibly including * ClassCastException. * - * @return true if unforked + * @return {@code true} if unforked */ public boolean tryUnfork() { return ((ForkJoinWorkerThread) Thread.currentThread()) @@ -950,13 +950,13 @@ public abstract class ForkJoinTask im // Extension methods /** - * Returns the result that would be returned by {@code join}, - * even if this task completed abnormally, or null if this task is - * not known to have been completed. This method is designed to - * aid debugging, as well as to support extensions. Its use in any - * other context is discouraged. + * Returns the result that would be returned by {@link #join}, even + * if this task completed abnormally, or {@code null} if this task + * is not known to have been completed. This method is designed + * to aid debugging, as well as to support extensions. Its use in + * any other context is discouraged. * - * @return the result, or null if not completed + * @return the result, or {@code null} if not completed */ public abstract V getRawResult(); @@ -975,10 +975,10 @@ public abstract class ForkJoinTask im * called otherwise. The return value controls whether this task * is considered to be done normally. It may return false in * asynchronous actions that require explicit invocations of - * {@code complete} to become joinable. It may throw exceptions + * {@link #complete} to become joinable. It may throw exceptions * to indicate abnormal exit. * - * @return true if completed normally + * @return {@code true} if completed normally * @throws Error or RuntimeException if encountered during computation */ protected abstract boolean exec(); @@ -994,7 +994,7 @@ public abstract class ForkJoinTask im * #inForkJoinPool}). Attempts to invoke in other contexts result * in exceptions or errors, possibly including ClassCastException. * - * @return the next task, or null if none are available + * @return the next task, or {@code null} if none are available */ protected static ForkJoinTask peekNextLocalTask() { return ((ForkJoinWorkerThread) Thread.currentThread()) @@ -1011,7 +1011,7 @@ public abstract class ForkJoinTask im * contexts result in exceptions or errors, possibly including * ClassCastException. * - * @return the next task, or null if none are available + * @return the next task, or {@code null} if none are available */ protected static ForkJoinTask pollNextLocalTask() { return ((ForkJoinWorkerThread) Thread.currentThread()) @@ -1032,7 +1032,7 @@ public abstract class ForkJoinTask im * result in exceptions or errors, possibly including * ClassCastException. * - * @return a task, or null if none are available + * @return a task, or {@code null} if none are available */ protected static ForkJoinTask pollTask() { return ((ForkJoinWorkerThread) Thread.currentThread()) @@ -1087,7 +1087,7 @@ public abstract class ForkJoinTask im * Save the state to a stream. * * @serialData the current run status and the exception thrown - * during execution, or null if none + * during execution, or {@code null} if none * @param s the stream */ private void writeObject(java.io.ObjectOutputStream s)