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

javadoc allows to create a @link to a non-existent method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 23
    • 9, 16
    • tools

      Consider the following snippet:

      /**
       * {@link Inner#nonExistentMethod}
       */
      public abstract class Outer {

          private Outer() { }

          /**
           * This method belongs to {@code Outer} but somehow can be referenced
           * through {@code Inner#nonExistentMethod}
           */
          public static void nonExistentMethod() { }

          interface Inner { }
      }

      javadoc produces documentation that actually contains a clickable (and working) link to "Outer.nonExistentMethod", though it has been referred to as "Inner#nonExistentMethod".

            hannesw Hannes Wallnoefer
            prappo Pavel Rappo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: