From 58851308aba533bfdf83e77dcebf0e7961cd6eb1 Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Thu, 27 Apr 2017 12:38:21 +0100 Subject: [PATCH] 8179392: Fix warnings in the httpclient javadoc Reviewed-by: dfuchs --- .../jdk/incubator/http/HttpRequest.java | 4 +-- .../jdk/incubator/http/HttpResponse.java | 26 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequest.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequest.java index 685b2dd810f..af8eb5b6b02 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequest.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -355,7 +355,7 @@ public abstract class HttpRequest { * of not setting a timeout is the same as setting an infinite Duration, ie. * block forever. * - * @param duration + * @param duration the timeout duration * @return this request builder */ public abstract Builder timeout(Duration duration); diff --git a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpResponse.java b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpResponse.java index 427b70a759d..89653a59839 100644 --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpResponse.java +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpResponse.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -224,7 +224,7 @@ public abstract class HttpResponse { 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 @@ public abstract class HttpResponse { * * @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 @@ public abstract class HttpResponse { * * @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 @@ public abstract class HttpResponse { * * @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 @@ public abstract class HttpResponse { * {@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 @@ public abstract class HttpResponse { * * @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 @@ public abstract class HttpResponse { * * @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 @@ public abstract class HttpResponse { * 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 @@ public abstract class HttpResponse { * 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 @@ public abstract class HttpResponse { * 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 @@ public abstract class HttpResponse { * 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 @@ public abstract class HttpResponse { * 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