http-client-branch: fix doc examples for BodyHandler::fromLineSubscriber (tahe II)
--- a/src/java.net.http/share/classes/java/net/http/HttpResponse.java Tue Feb 13 14:34:00 2018 +0000
+++ b/src/java.net.http/share/classes/java/net/http/HttpResponse.java Tue Feb 13 14:42:41 2018 +0000
@@ -373,8 +373,8 @@
* // and accumulates lines that match a particular pattern
* Pattern pattern = ...;
* LineParserSubscriber subscriber = new LineParserSubscriber(pattern);
- * HttpResponse<List<String>> response = client.sendAsync(request,
- * BodyHandler.fromLineSubscriber(subscriber, (s) -> s.getMatchingLines(), "\n")).join();
+ * HttpResponse<List<String>> response = client.send(request,
+ * BodyHandler.fromLineSubscriber(subscriber, s -> s.getMatchingLines(), "\n"));
* if (response.statusCode() != 200) {
* System.err.printf("ERROR: %d status received%n", response.statusCode());
* } }</pre>
--- a/test/jdk/java/net/httpclient/examples/JavadocExamples.java Tue Feb 13 14:34:00 2018 +0000
+++ b/test/jdk/java/net/httpclient/examples/JavadocExamples.java Tue Feb 13 14:42:41 2018 +0000
@@ -86,7 +86,7 @@
* Pattern pattern = ...;
* LineParserSubscriber subscriber = new LineParserSubscriber(pattern);
* HttpResponse<List<String>> response = client.send(request,
- * BodyHandler.fromLineSubscriber(subscriber, s -> s.getMatchingLines(), "\n"));
+ * BodyHandler.fromLineSubscriber(subscriber, s -> s.getMatchingLines(), "\n"));
* if (response.statusCode() != 200) {
* System.err.printf("ERROR: %d status received%n", response.statusCode());
* } }</pre>