SnippetTaglet should report an error if provided ambiguous links

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 25
    • Affects Version/s: 24, 25
    • Component/s: tools
    • None

      Consider code like:

      ```
      interface One {
          /**
           * {@code One obj1}
           * {@snippet lang = java:
           * // @link substring="ab" target="One#ab" :
           * obj1.ab(a()); // @link substring="a" target="#a"
           *} class comment
           */
          void start();
          int a();
          void with();
          void ab(int i);
      }
      ```

      The "a" in "ab" matches for two regexes, this creates ambiguity, which is resolved at random.

      An error should be reported to inform users about this, something like "error: ambiguous link in <location>"

            Assignee:
            Nizar Benalla
            Reporter:
            Nizar Benalla
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: