Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8356549 javadoc has incorrect {@link/@linkplain} tags with refer to private/protected types
  3. JDK-8356632

Fix remaining {@link/@linkplain} tags with refer to private/protected types in java.base

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • None
    • core-libs

      After adding a warning for `{@link}` tags that refer to private/protected types, we see these warnings when building javadoc.

      ```
      src/java.base/share/classes/java/util/concurrent/ForkJoinTask.java:134: warning: reference to non-visible type: getException(boolean) (use -protected or -private options to document non-public types)
       * true if the task was cancelled (in which case {@link #getException}
                                                       ^
      src/java.base/share/classes/java/util/concurrent/ForkJoinTask.java:137: warning: reference to non-visible type: getException(boolean) (use -protected or -private options to document non-public types)
       * cancelled or encountered an exception, in which case {@link
                                                              ^
      src/java.base/share/classes/javax/crypto/KEM.java:711: warning: reference to non-visible type: KEM.Encapsulated.params (use -protected or -private options to document non-public types)
           * {@link Encapsulated#params} field inside the encapsulation output.
             ^
      src/java.base/share/classes/java/lang/invoke/MethodHandles.java:4893: warning: reference to non-visible type: primitiveZero(Wrapper) (use -protected or -private options to document non-public types)
           * @see MethodHandles#primitiveZero
             ^
      src/java.base/share/classes/java/lang/invoke/MethodHandles.java:2824: warning: reference to non-visible type: Module.reads (use -protected or -private options to document non-public types)
               * {@linkplain Module#reads reads} {@code M0} and the type is
                     ^
      src/java.base/share/classes/java/lang/invoke/MethodHandles.java:2827: warning: reference to non-visible type: Module.reads (use -protected or -private options to document non-public types)
               * {@linkplain Module#reads reads} {@code M1} and the type is
                     ^
      src/java.base/share/classes/java/lang/module/ModuleDescriptor.java:2023: warning: reference to non-visible type: ModuleDescriptor.Provides.providers (use -protected or -private options to document non-public types)
               * each {@link Provides#providers provider} (or provider factory) is
                      ^

      src/java.base/share/classes/java/net/Socket.java:682: warning: reference to non-visible type: isBound(int) (use -protected or -private options to document non-public types)
           * @see #isBound
             ^
      src/java.base/share/classes/java/net/Socket.java:1615: warning: reference to non-visible type: isClosed(int) (use -protected or -private options to document non-public types)
           * @see #isClosed
             ^
      src/java.base/share/classes/java/net/Socket.java:1645: warning: reference to non-visible type: isInputShutdown(int) (use -protected or -private options to document non-public types)
           * @see #isInputShutdown
             ^
      src/java.base/share/classes/java/net/Socket.java:1675: warning: reference to non-visible type: isOutputShutdown(int) (use -protected or -private options to document non-public types)
           * @see #isOutputShutdown
             ^

      src/java.base/share/classes/java/lang/Thread.java:1563: warning: reference to non-visible type: interrupted (use -protected or -private options to document non-public types)
           * will report it via {@link #interrupted} and {@link #isInterrupted()}.
                                ^

      src/java.base/share/classes/java/lang/invoke/MethodType.java:1335: warning: reference to non-visible type: MethodType.readResolve() (use -protected or -private options to document non-public types)
           * {@link #readResolve readResolve}.
             ^
      src/java.base/share/classes/java/lang/invoke/MethodType.java:1340: warning: reference to non-visible type: MethodType.readResolve() (use -protected or -private options to document non-public types)
           * @see #readResolve
             ^
      src/java.base/share/classes/java/lang/invoke/MethodType.java:1341: warning: reference to non-visible type: MethodType.writeObject(ObjectOutputStream) (use -protected or -private options to document non-public types)
           * @see #writeObject
             ^
      ```

            nbenalla Nizar Benalla
            nbenalla Nizar Benalla
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: