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

Bad HTML in {@link} for HttpResponse.BodyHandlers.ofPublisher

XMLWordPrintable

    • b14
    • Not verified

      This is similar to but different from a previous instance of this type of issue.

      This is at about line 698 in HttpResponse.

              /**
               * Returns a {@code BodyHandler<Publisher<List<ByteBuffer>>>} that creates a
               * {@link BodySubscriber BodySubscriber}{@code <Publisher<List<ByteBuffer>>>}
               * obtained from {@link BodySubscribers#ofPublisher()
               * BodySubscribers.ofPublisher()}.
               *
               * <p> When the {@code HttpResponse} object is returned, the response
               * headers will have been completely read, but the body may not have
               * been fully received yet. The {@link #body()} method returns a
               * {@link Publisher Publisher<List<ByteBuffer>>} from which the body
               * response bytes can be obtained as they are received. The publisher
               * can and must be subscribed to only once.
               *
               * @apiNote See {@link BodySubscribers#ofPublisher()} for more
               * information.
               *
               * @return a response body handler
               */
              public static BodyHandler<Publisher<List<ByteBuffer>>> ofPublisher() {
                  return (responseInfo) -> BodySubscribers.ofPublisher();
              }

      Note the {@link Publisher Publisher<List<ByteBuffer>>}
      The Publisher<List<ByteBuffer>> is read as literal HTML, which is invalid.

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

              Created:
              Updated:
              Resolved: