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

Generated JavaDoc for Optional.orElseThrow() is not correct

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: P4
    • Resolution: Unresolved
    • Affects Version/s: 8u40, 9
    • Fix Version/s: tbd_minor
    • Component/s: tools
    • Labels:

      Description

      A DESCRIPTION OF THE PROBLEM :
      The javadoc signature for method java.util.Optional.orElseThrow() is shown as:

      public <X extends Throwable> T orElseThrow(Supplier<? extends X> exceptionSupplier) throws X extends Throwable

      The text "extends Throwable" at the very end of that signature is invalid, and should be deleted from the API Specification.

      This issue also applies to the method with that same name in classes OptionalDouble, OptionalInt and OptionalLong in package java.util.

      The errors are in the current download file named jdk-8u40-docs-all.zip.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      public <X extends Throwable> T orElseThrow(Supplier<? extends X> exceptionSupplier) throws X


      ACTUAL -
      public <X extends Throwable> T orElseThrow(Supplier<? extends X> exceptionSupplier) throws X extends Throwable



      URL OF FAULTY DOCUMENTATION :
      https://docs.oracle.com/javase/8/docs/api/java/util/OptionalInt.html#orElseThrow-java.util.function.Supplier-

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Dates

                Created:
                Updated: