# HG changeset patch # User chegar # Date 1518179647 0 # Node ID 41ba54ac9403123766e8a41865106927614b36d0 # Parent e1890248eafe56335f2dc96e03ab4a0c09913b96 http-client-branch: revert overzealous use of @linkplain diff -r e1890248eafe -r 41ba54ac9403 src/java.net.http/share/classes/java/net/http/HttpClient.java --- a/src/java.net.http/share/classes/java/net/http/HttpClient.java Fri Feb 09 09:26:44 2018 +0000 +++ b/src/java.net.http/share/classes/java/net/http/HttpClient.java Fri Feb 09 12:34:07 2018 +0000 @@ -59,9 +59,9 @@ *
An {@code HttpClient} provides configuration information, and resource * sharing, for all requests send through it. * - *
A {@linkplain BodyHandler BodyHandler} must be supplied for each {@link + *
A {@link 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
+ * response body, if any. Once an {@link 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 Builders are created by invoking {@linkplain HttpClient#newBuilder()
+ * Builders are created by invoking {@link HttpClient#newBuilder()
* newBuilder}. Each of the setter methods modifies the state of the builder
* and returns the same instance. Builders are not thread-safe and should not be
* used concurrently from multiple threads without external synchronization.
@@ -311,7 +311,7 @@
* ProxySelector#getDefault() default proxy selector}, which is usually
* adequate for client applications. This default behavior can be turned
* off by supplying an explicit proxy selector to this method, such as
- * {@link #NO_PROXY} or one returned by {@linkplain
+ * {@link #NO_PROXY} or one returned by {@link
* ProxySelector#of(InetSocketAddress) ProxySelector::of}, before
* {@linkplain #build() building}.
*
@@ -339,7 +339,7 @@
/**
- * Returns an {@code Optional} containing this client's {@linkplain
+ * Returns an {@code Optional} containing this client's {@link
* CookieHandler}. If no {@code CookieHandler} was set in this client's
* builder, then the {@code Optional} is empty.
*
@@ -414,7 +414,7 @@
public abstract HttpClient.Version version();
/**
- * Returns an {@code Optional} containing this client's {@linkplain
+ * Returns an {@code Optional} containing this client's {@link
* Executor}. If no {@code Executor} was set in the client's builder,
* then the {@code Optional} is empty.
*
diff -r e1890248eafe -r 41ba54ac9403 src/java.net.http/share/classes/java/net/http/HttpHeaders.java
--- a/src/java.net.http/share/classes/java/net/http/HttpHeaders.java Fri Feb 09 09:26:44 2018 +0000
+++ b/src/java.net.http/share/classes/java/net/http/HttpHeaders.java Fri Feb 09 12:34:07 2018 +0000
@@ -37,7 +37,7 @@
* A read-only view of a set of HTTP headers.
*
* The methods of this class ( that accept a String header name ), and the
- * Map returned by the {@linkplain #map() map} method, operate without regard to
+ * Map returned by the {@link #map() map} method, operate without regard to
* case when retrieving the header value.
*
* HttpHeaders instances are immutable.
@@ -138,7 +138,7 @@
* Computes a hash code for this HTTP headers instance.
*
* The hash code is based upon the components of the HTTP headers
- * {@linkplain #map() map}, and satisfies the general contract of the
+ * {@link #map() map}, and satisfies the general contract of the
* {@link Object#hashCode Object.hashCode} method.
*
* @return the hash-code value for this HTTP headers
diff -r e1890248eafe -r 41ba54ac9403 src/java.net.http/share/classes/java/net/http/HttpRequest.java
--- a/src/java.net.http/share/classes/java/net/http/HttpRequest.java Fri Feb 09 09:26:44 2018 +0000
+++ b/src/java.net.http/share/classes/java/net/http/HttpRequest.java Fri Feb 09 12:34:07 2018 +0000
@@ -54,12 +54,12 @@
*
* An {@code HttpRequest} instance is built through an {@code HttpRequest}
* {@linkplain HttpRequest.Builder builder}. An {@code HttpRequest} builder
- * is obtained from one of the {@linkplain HttpRequest#newBuilder(URI) newBuilder}
- * methods. A request's {@linkplain URI}, headers, and body can be set. Request
- * bodies are provided through a {@linkplain BodyPublisher BodyPublisher}
- * supplied to one of the {@linkplain Builder#DELETE(BodyPublisher) DELETE},
- * {@linkplain Builder#POST(BodyPublisher) POST} or
- * {@linkplain Builder#PUT(BodyPublisher) PUT} methods.
+ * is obtained from one of the {@link HttpRequest#newBuilder(URI) newBuilder}
+ * methods. A request's {@link URI}, headers, and body can be set. Request
+ * bodies are provided through a {@link BodyPublisher BodyPublisher} supplied
+ * to one of the {@link Builder#DELETE(BodyPublisher) DELETE},
+ * {@link Builder#POST(BodyPublisher) POST} or
+ * {@link Builder#PUT(BodyPublisher) PUT} methods.
* Once all required parameters have been set in the builder, {@link
* Builder#build() build} will return the {@code HttpRequest}. Builders can be
* copied and modified many times in order to build multiple related requests
@@ -78,7 +78,7 @@
* Request bodies
*
* Request bodies can be sent using one of the convenience request publisher
- * implementations, provided in {@linkplain BodyPublisher BodyPublisher}.
+ * implementations, provided in {@link BodyPublisher BodyPublisher}.
* Each of the setter methods in this class modifies the state of the
* builder and returns this (ie. the same instance). The methods are
* not synchronized and should not be called from multiple threads without
- * external synchronization. The {@linkplain #build() build} method returns
+ * external synchronization. The {@link #build() build} method returns
* a new {@code HttpRequest} each time it is invoked. Once built an {@code
* HttpRequest} is immutable, and can be sent multiple times.
*
@@ -280,7 +280,7 @@
* Sets the request method and request body of this builder to the
* given values.
*
- * @apiNote The {@linkplain BodyPublisher#noBody() noBody} request
+ * @apiNote The {@link BodyPublisher#noBody() noBody} request
* body publisher can be used where no request body is required or
* appropriate. Whether a method is restricted, or not, is
* implementation specific. For example, some implementations may choose
diff -r e1890248eafe -r 41ba54ac9403 src/java.net.http/share/classes/java/net/http/HttpResponse.java
--- a/src/java.net.http/share/classes/java/net/http/HttpResponse.java Fri Feb 09 09:26:44 2018 +0000
+++ b/src/java.net.http/share/classes/java/net/http/HttpResponse.java Fri Feb 09 12:34:07 2018 +0000
@@ -60,11 +60,11 @@
* An HTTP response.
*
* An {@code HttpResponse} is not created directly, but rather returned as
- * a result of sending an {@linkplain HttpRequest}. An {@code HttpResponse} is
+ * a result of sending an {@link HttpRequest}. An {@code HttpResponse} is
* made available when the response status code and headers have been received,
* and typically after the response body has also been completely received.
* Whether or not the {@code HttpResponse} is made available before the response
- * body has been completely received depends on the {@linkplain BodyHandler
+ * body has been completely received depends on the {@link BodyHandler
* BodyHandler} provided when sending the {@code HttpRequest}.
*
* This class provides methods for accessing the response status code,
@@ -165,7 +165,7 @@
*
* The {@code BodyHandler} interface allows inspection of the response
* code and headers, before the actual response body is received, and is
- * responsible for creating the response {@linkplain BodySubscriber
+ * responsible for creating the response {@link BodySubscriber
* BodySubscriber}. The {@code BodySubscriber} consumes the actual response
* body bytes and converts them into a higher-level Java type.
*
@@ -208,7 +208,7 @@
* .thenAccept(System.out::println) }
* Note, that even though these pre-defined handlers do not examine the
* response code, the response code and headers are always retrievable from
- * the {@linkplain HttpResponse}, when it is returned.
+ * the {@link HttpResponse}, when it is returned.
*
* In the second example, the function returns a different subscriber
* depending on the status code.
@@ -227,13 +227,13 @@
@FunctionalInterface
public interface BodyHandler The response body can be discarded using one of {@linkplain
- * #discard() discard} or {@linkplain #replace(Object) replace}.
+ * The response body can be discarded using one of {@link
+ * #discard() discard} or {@link #replace(Object) replace}.
*
* @param statusCode the HTTP status code received
* @param responseHeaders the response headers received
@@ -244,7 +244,7 @@
/**
* Returns a response body handler that returns a {@link BodySubscriber
- * BodySubscriber}{@code The given {@code finisher} function is applied after the given
* subscriber's {@code onComplete} has been invoked. The {@code finisher}
@@ -1081,10 +1080,10 @@
* Returns a {@code BodySubscriber} which buffers data before delivering
* it to the given downstream subscriber. The subscriber guarantees to
* deliver {@code buffersize} bytes of data to each invocation of the
- * downstream's {@linkplain #onNext(Object) onNext} method, except for
- * the final invocation, just before {@linkplain #onComplete() onComplete}
+ * downstream's {@link #onNext(Object) onNext} method, except for
+ * the final invocation, just before {@link #onComplete() onComplete}
* is invoked. The final invocation of {@code onNext} may contain fewer
- * than {@code buffersize} bytes.
+ * than {@code bufferSize} bytes.
*
* The returned subscriber delegates its {@link #getBody()} method
* to the downstream subscriber.
@@ -1107,10 +1106,10 @@
* given {@code upstream} {@code BodySubscriber}.
*
* The mapping function is executed using the client's {@linkplain
- * HttpClient#executor()}, and can therefore be used to map any response
- * body type, including blocking {@linkplain InputStream}, as shown in
- * the following example which uses a well-known JSON parser to convert
- * an {@code InputStream} into any annotated Java object type.
+ * HttpClient#executor() executor}, and can therefore be used to map any
+ * response body type, including blocking {@link InputStream}, as shown
+ * in the following example which uses a well-known JSON parser to
+ * convert an {@code InputStream} into any annotated Java type.
*
* For example:
*
*
{@code public static