--- old/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpResponse.java 2017-04-27 11:47:34.000000000 +0100 +++ new/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpResponse.java 2017-04-27 11:47:32.000000000 +0100 @@ -224,7 +224,7 @@ public interface BodyHandler { /** - * Return a {@link BodyProcessor BodyProcessor} considering the given response status + * Returns a {@link BodyProcessor BodyProcessor} considering the given response status * code and headers. This method is always called before the body is read * and its implementation can decide to keep the body and store it somewhere * or else discard it, by returning the {@code BodyProcessor} returned @@ -232,7 +232,7 @@ * * @param statusCode the HTTP status code received * @param responseHeaders the response headers received - * @return + * @return a response body handler */ public BodyProcessor apply(int statusCode, HttpHeaders responseHeaders); @@ -242,7 +242,7 @@ * * @param the response body type * @param value the value of U to return as the body - * @return + * @return a response body handler */ public static BodyHandler discard(U value) { return (status, headers) -> BodyProcessor.discard(value); @@ -260,7 +260,7 @@ * * @param charset the name of the charset to interpret the body as. If * {@code null} then charset determined from Content-encoding header - * @return a response handler + * @return a response body handler */ public static BodyHandler asString(Charset charset) { return (status, headers) -> { @@ -282,7 +282,7 @@ * {@link Path}. * * @param file the file to store the body in - * @return a response handler + * @return a response body handler */ public static BodyHandler asFile(Path file) { return (status, headers) -> BodyProcessor.asFile(file); @@ -306,7 +306,7 @@ * * @param directory the directory to store the file in * @param openOptions open options - * @return a response handler + * @return a response body handler */ public static BodyHandler asFileDownload(Path directory, OpenOption... openOptions) { return (status, headers) -> { @@ -343,7 +343,7 @@ * * @param file the filename to store the body in * @param openOptions any options to use when opening/creating the file - * @return a response handler + * @return a response body handler */ public static BodyHandler asFile(Path file, OpenOption... openOptions) { return (status, headers) -> BodyProcessor.asFile(file, openOptions); @@ -359,7 +359,7 @@ * written to the consumer. * * @param consumer a Consumer to accept the response body - * @return a a response handler + * @return a response body handler */ public static BodyHandler asByteArrayConsumer(Consumer> consumer) { return (status, headers) -> BodyProcessor.asByteArrayConsumer(consumer); @@ -373,7 +373,7 @@ * When the {@code HttpResponse} object is returned, the body has been completely * written to the byte array. * - * @return a response handler + * @return a response body handler */ public static BodyHandler asByteArray() { return (status, headers) -> BodyProcessor.asByteArray(); @@ -392,7 +392,7 @@ * When the {@code HttpResponse} object is returned, the body has been completely * written to the string. * - * @return a response handler + * @return a response body handler */ public static BodyHandler asString() { return (status, headers) -> BodyProcessor.asString(charsetFrom(headers)); @@ -606,7 +606,7 @@ * either one of onResponse() or onError() is guaranteed to be called, * but not both. * - * @param request + * @param request the main request or subsequent push promise * @param t the Throwable that caused the error */ void onError(HttpRequest request, Throwable t); @@ -717,7 +717,7 @@ * join() call returns, all {@code HttpResponse}s and their associated * body objects are available. * - * @param + * @param the body type used for all responses * @param pushHandler a function invoked for each request or push * promise * @return a MultiProcessor