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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 11, 12
    • Fix Version/s: 12
    • Component/s: core-libs
    • Subcomponent:
    • Introduced In Version:
      11
    • Resolved In Build:
      b04
    • Verification:
      Not verified

      Backports

        Description

        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

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved: