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

Generated HTML for snippet does not always contain an id

XMLWordPrintable

        I would like to link to a specific part of this javadoc -- https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/io/ObjectInputStream.html -- specifically the paragraph that says "Serializable classes that require special handling ..."
        It would be good enough to link to the snippet which follows, and -- joy! -- snippets support an id attribute! But, we don't explicitly write id attributes in snippets: https://github.com/openjdk/jdk/blob/605c9767291ddf1c409c3e805ffb3182899d06c2/src/java.base/share/classes/java/io/ObjectInputStream.java#L146
        But but, the HTML should have an id attribute anyway, according to https://openjdk.org/jeps/413#Generated-HTML: "The generated HTML for each snippet will declare an id attribute so that the snippet can be the target of a link from elsewhere in the documentation. The value of the id attribute in the HTML will be the value of the id attribute declared in the snippet tag, if any, otherwise a default value will be used."
        So, bug report: the generated HTML does not always declare an id attribute.

              prappo Pavel Rappo (Inactive)
              jjg Jonathan Gibbons
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: