Skip to content

Commit ec683a1

Browse files
committedMar 10, 2025
8351419: java.net.http: Cleanup links in HttpResponse and module-info API doc comments
Reviewed-by: michaelm, vyazici
1 parent f61f520 commit ec683a1

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed
 

‎src/java.net.http/share/classes/java/net/http/HttpResponse.java

+8-8
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ private BodyHandlers() { }
383383
* BodySubscribers#fromLineSubscriber(Subscriber, Function, Charset, String)
384384
* BodySubscribers.fromLineSubscriber(subscriber, s -> null, charset, null)},
385385
* with the given {@code subscriber}.
386-
* The {@link Charset charset} used to decode the response body bytes is
386+
* The {@linkplain Charset charset} used to decode the response body bytes is
387387
* obtained from the HTTP response headers as specified by {@link #ofString()},
388388
* and lines are delimited in the manner of {@link BufferedReader#readLine()}.
389389
*
@@ -429,7 +429,7 @@ private BodyHandlers() { }
429429
* BodySubscribers#fromLineSubscriber(Subscriber, Function, Charset, String)
430430
* BodySubscribers.fromLineSubscriber(subscriber, finisher, charset, lineSeparator)},
431431
* with the given {@code subscriber}, {@code finisher} function, and line separator.
432-
* The {@link Charset charset} used to decode the response body bytes is
432+
* The {@linkplain Charset charset} used to decode the response body bytes is
433433
* obtained from the HTTP response headers as specified by {@link #ofString()}.
434434
*
435435
* <p> The given {@code finisher} function is applied after the given
@@ -619,7 +619,7 @@ public static BodyHandler<InputStream> ofInputStream() {
619619
* Returns a {@code BodyHandler<Stream<String>>} that returns a
620620
* {@link BodySubscriber BodySubscriber}{@code <Stream<String>>} obtained
621621
* from {@link BodySubscribers#ofLines(Charset) BodySubscribers.ofLines(charset)}.
622-
* The {@link Charset charset} used to decode the response body bytes is
622+
* The {@linkplain Charset charset} used to decode the response body bytes is
623623
* obtained from the HTTP response headers as specified by {@link #ofString()},
624624
* and lines are delimited in the manner of {@link BufferedReader#readLine()}.
625625
*
@@ -715,7 +715,7 @@ public static BodyHandler<String> ofString() {
715715
* To ensure that all resources associated with the
716716
* corresponding exchange are properly released the caller must
717717
* subscribe to the publisher and conform to the rules outlined in
718-
* {@linkplain BodySubscribers#ofPublisher()}
718+
* {@link BodySubscribers#ofPublisher()}
719719
*
720720
* @return a {@linkplain HttpClient##streaming publishing} response body handler
721721
*
@@ -896,7 +896,7 @@ public void applyPushPromise(
896896
* BodySubscriber} should ensure to {@linkplain Flow.Subscription#request
897897
* request} more data until one of {@link #onComplete() onComplete} or
898898
* {@link #onError(Throwable) onError} are signalled, or {@link
899-
* Flow.Subscription#request cancel} its {@linkplain
899+
* Flow.Subscription#cancel cancel} its {@linkplain
900900
* #onSubscribe(Flow.Subscription) subscription} if unable or unwilling to
901901
* do so. Calling {@code cancel} before exhausting the response body data
902902
* may cause the underlying HTTP connection to be closed and prevent it
@@ -916,7 +916,7 @@ public interface BodySubscriber<T>
916916
* Returns a {@code CompletionStage} which when completed will return
917917
* the response body object. This method can be called at any time
918918
* relative to the other {@link Flow.Subscriber} methods and is invoked
919-
* using the client's {@link HttpClient#executor() executor}.
919+
* using the client's {@linkplain HttpClient#executor() executor}.
920920
*
921921
* @return a CompletionStage for the response body
922922
*/
@@ -962,7 +962,7 @@ public interface BodySubscriber<T>
962962
* the resources associated with the request and the client to be {@linkplain
963963
* HttpClient##closing eventually reclaimed}.
964964
* Some other implementations are {@linkplain Publisher publishers} which need to be
965-
* {@link BodySubscribers#ofPublisher() subscribed} in order for their associated
965+
* {@linkplain BodySubscribers#ofPublisher() subscribed} in order for their associated
966966
* resources to be released and for the associated request to {@linkplain
967967
* HttpClient##closing run to completion}.
968968
*
@@ -1159,7 +1159,7 @@ public static BodySubscriber<Path> ofFile(Path file) {
11591159
* Returns a {@code BodySubscriber} which provides the incoming body
11601160
* data to the provided Consumer of {@code Optional<byte[]>}. Each
11611161
* call to {@link Consumer#accept(java.lang.Object) Consumer.accept()}
1162-
* will contain a non empty {@code Optional}, except for the final
1162+
* will contain a non-empty {@code Optional}, except for the final
11631163
* invocation after all body data has been read, when the {@code
11641164
* Optional} will be empty.
11651165
*

‎src/java.net.http/share/classes/module-info.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -139,8 +139,9 @@
139139
* simultaneously.
140140
* </li>
141141
* <li><p><b>{@systemProperty jdk.httpclient.receiveBufferSize}</b> (default: operating system
142-
* default)<br>The HTTP client <a href="../java.base/java/net/StandardSocketOptions.html#SO_RCVBUF">
143-
* socket receive buffer size</a> in bytes.
142+
* default)<br>The HTTP client {@linkplain java.nio.channels.SocketChannel socket}
143+
* {@linkplain java.net.StandardSocketOptions#SO_RCVBUF receive buffer size} in bytes.
144+
* Values less than or equal to zero are ignored.
144145
* </li>
145146
* <li><p><b>{@systemProperty jdk.httpclient.redirects.retrylimit}</b> (default: 5)<br>
146147
* The maximum number of attempts to send a HTTP request when redirected or any failure occurs
@@ -158,8 +159,8 @@
158159
* authentication.
159160
* </li>
160161
* <li><p><b>{@systemProperty jdk.httpclient.sendBufferSize}</b> (default: operating system
161-
* default)<br>The HTTP client socket
162-
* <a href="../java.base/java/net/StandardSocketOptions.html#SO_SNDBUF">send buffer size</a>.
162+
* default)<br>The HTTP client {@linkplain java.nio.channels.SocketChannel socket}
163+
* {@linkplain java.net.StandardSocketOptions#SO_SNDBUF send buffer size} in bytes.
163164
* Values less than or equal to zero are ignored.
164165
* </li>
165166
* <li><p><b>{@systemProperty jdk.internal.httpclient.disableHostnameVerification}</b> (default:

0 commit comments

Comments
 (0)
Please sign in to comment.