--- a/src/java.net.http/share/classes/java/net/http/HttpClient.java Thu Feb 08 20:58:35 2018 +0000
+++ b/src/java.net.http/share/classes/java/net/http/HttpClient.java Fri Feb 09 09:26:44 2018 +0000
@@ -59,7 +59,14 @@
* <p> An {@code HttpClient} provides configuration information, and resource
* sharing, for all requests send through it.
*
- * <p> Requests can be made either synchronously or asynchronously:
+ * <p> A {@linkplain BodyHandler BodyHandler} must be supplied for each {@link
+ * HttpRequest} sent. The {@code BodyHandler} determines how to handle the
+ * response body, if any. Once an {@linkplain HttpResponse} is received, the
+ * headers, response code, and body (typically) are available. Whether the
+ * response body bytes has been read or not depends on the type {@code <T>} of
+ * the response body.
+ *
+ * <p> Requests can be sent either synchronously or asynchronously:
* <ul>
* <li>{@link HttpClient#send(HttpRequest, BodyHandler)} blocks
* until the request has been sent and the response has been received.</li>
@@ -73,13 +80,6 @@
* declare dependencies among several asynchronous tasks.</li>
* </ul>
*
- * <p> A {@linkplain BodyHandler BodyHandler} must be supplied for each {@code
- * HttpRequest} sent. The {@code BodyHandler} determines how to handle the
- * response body, if any. Once an {@linkplain HttpResponse} is received, the
- * headers, response code, and body (typically) are available. Whether the
- * response body bytes has been read or not depends on the type {@code <T>} of
- * the response body.
- *
* <p><b>Synchronous Example</b>
* <pre>{@code HttpClient client = HttpClient.newBuilder()
* .version(Version.HTTP_1)
@@ -100,8 +100,7 @@
* .build();
* client.sendAsync(request, BodyHandler.asString())
* .thenApply(HttpResponse::body)
- * .thenAccept(System.out::println)
- * .join(); }</pre>
+ * .thenAccept(System.out::println); }</pre>
*
* <p> <a id="securitychecks"></a><b>Security checks</b></a>
*