Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8244298

JavaDoc discription mistake in Future.java

XMLWordPrintable

      A DESCRIPTION OF THE PROBLEM :
        /**
           * Waits if necessary for the computation to complete, and then
           * retrieves its result.
           *
           * @return the computed result
           * @throws CancellationException if the computation was cancelled
           * @throws ExecutionException if the computation threw an
           * exception
           * @throws InterruptedException if the current thread was interrupted
           * while waiting
           */
          V get() throws InterruptedException, ExecutionException;

          /**
           * Waits if necessary for at most the given time for the computation
           * to complete, and then retrieves its result, if available.
           *
           * @param timeout the maximum time to wait
           * @param unit the time unit of the timeout argument
           * @return the computed result
           * @throws CancellationException if the computation was cancelled
           * @throws ExecutionException if the computation threw an
           * exception
           * @throws InterruptedException if the current thread was interrupted
           * while waiting
           * @throws TimeoutException if the wait timed out
           */
          V get(long timeout, TimeUnit unit)
              throws InterruptedException, ExecutionException, TimeoutException;

      --------------------------------------

      The signatures of two "get" method do not contain "throws CancellationException", but the JavaDoc of them contains.

      FREQUENCY : always


            martin Martin Buchholz
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: