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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 23
    • Affects Version/s: 9, 16
    • Component/s: 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".

            Assignee:
            Hannes Wallnoefer
            Reporter:
            Pavel Rappo
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: