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

Bad HTML in {@link} in HttpResponse.BodySubscribers.ofPublisher

XMLWordPrintable

    • 11
    • b04
    • Not verified

        src/java.net.http/share/classes/java/net/http/HttpResponse.java, lines 1190,1191

                 * Returns a response subscriber which publishes the response body
                 * through a {@link Publisher Publisher<List<ByteBuffer>>}.

        Although it is not clearly stated in the spec, it can reasonably be inferred that the "label" in an {@link} tag is HTML, not plain text. This inference is backed up by the current implementation.

        That implies that it is incorrect to use unescaped < > for the type parameters. The @link should be using &lt; and &gt; instead.

        The current representation shows up as bad HTML in the generated API docs. See the early access docs for JDK 11
        https://download.java.net/java/early_access/jdk11/docs/api/java.net.http/java/net/http/HttpResponse.BodySubscribers.html#ofPublisher%28%29

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

                Created:
                Updated:
                Resolved: