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

Doclet incorrectly updates all attributes in <a> tags when relocating links

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 11
    • 9
    • tools
    • None

      The doclet tries to update `<a ...>` tags in doc comments when copying the comment for use in another file in another directory.

      But, it updates ANY/ALL attribute in the `<a...>` tag, and not just the href attribute, which is what the correct behavior would be.

      In particular, it modifies any `name=...` attribute that it finds, as exemplified in this test ... (TestRelativeLinks.java) ... see line 71 and weep.


        64 // INDEX PAGE
        65 checkOutput("index-all.html", true,
        66 "<a href=\"./pkg/relative-class-link.html\">relative class link</a>",
        67 "<a href=\"./pkg/relative-field-link.html\">relative field link</a>",
        68 "<a href=\"./pkg/relative-method-link.html\">relative method link</a>",
        69 "<a href=\"./pkg/relative-package-link.html\">relative package link</a>",
        70 " <a href=\"./pkg/relative-multi-line-link.html\">relative-multi-line-link</a>.",
        71 "<div class=\"block\"><a name=\"./pkg/masters\"></a>");

            jjg Jonathan Gibbons
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: