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

Typo in ThreadPoolExecutor.afterExecute()

    Details

      Description

      A DESCRIPTION OF THE PROBLEM :
      The code in the javadocs mentions

           r instanceof Future<?>
      and
           result = ((Future<?>) r).get()

      The Future there should be changed to FutureTask. r is a Runnable and Future doesn't implement Runnable but FutureTask does and is mentioned in the javadocs about the code.


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
           r instanceof FutureTask<?>
      and
          result = ((FutureTask<?>) r).get()
      ACTUAL -
           r instanceof Future<?>
      and
           result = ((Future<?>) r).get()


      URL OF FAULTY DOCUMENTATION :
      https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/ThreadPoolExecutor.html#afterExecute-java.lang.Runnable-java.lang.Throwable-

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: