http-client-branch: revert overzealous use of @linkplain http-client-branch
authorchegar
Fri, 09 Feb 2018 12:34:07 +0000
branchhttp-client-branch
changeset 56099 41ba54ac9403
parent 56098 e1890248eafe
child 56100 4a0ad0602b99
http-client-branch: revert overzealous use of @linkplain
src/java.net.http/share/classes/java/net/http/HttpClient.java
src/java.net.http/share/classes/java/net/http/HttpHeaders.java
src/java.net.http/share/classes/java/net/http/HttpRequest.java
src/java.net.http/share/classes/java/net/http/HttpResponse.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 @@
  * <p> An {@code HttpClient} provides configuration information, and resource
  * sharing, for all requests send through it.
  *
- * <p> A {@linkplain BodyHandler BodyHandler} must be supplied for each {@link
+ * <p> 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 <T>} of
  * the response body.
@@ -73,8 +73,8 @@
  *
  *     <li>{@link HttpClient#sendAsync(HttpRequest, BodyHandler)} sends the
  *     request and receives the response asynchronously. The {@code sendAsync}
- *     method returns immediately with a {@linkplain CompletableFuture
- *     CompletableFuture}&lt;{@linkplain HttpResponse}&gt;. The {@code
+ *     method returns immediately with a {@link CompletableFuture
+ *     CompletableFuture}&lt;{@link HttpResponse}&gt;. The {@code
  *     CompletableFuture} completes when the response becomes available. The
  *     returned {@code CompletableFuture} can be combined in different ways to
  *     declare dependencies among several asynchronous tasks.</li>
@@ -168,7 +168,7 @@
     /**
      * A builder of {@link HttpClient}s.
      *
-     * <p> Builders are created by invoking {@linkplain HttpClient#newBuilder()
+     * <p> 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.
      *
--- 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.
  *
  * <p> 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.
  *
  * <p> HttpHeaders instances are immutable.
@@ -138,7 +138,7 @@
      * Computes a hash code for this HTTP headers instance.
      *
      * <p> 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
--- 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 @@
  *
  * <p> 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 @@
  * <p><b>Request bodies</b>
  *
  * <p> Request bodies can be sent using one of the convenience request publisher
- * implementations, provided in {@linkplain BodyPublisher BodyPublisher}.
+ * implementations, provided in {@link BodyPublisher BodyPublisher}.
  * <ul>
  * <li>{@link BodyPublisher#fromByteArray(byte[]) fromByteArray(byte[])} from byte array</li>
  * <li>{@link BodyPublisher#fromByteArrays(Iterable) fromByteArrays(Iterable)}
@@ -111,7 +111,7 @@
      * <p> Each of the setter methods in this class modifies the state of the
      * builder and returns <i>this</i> (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
--- 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.
  *
  * <p> 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}.
  *
  * <p> This class provides methods for accessing the response status code,
@@ -165,7 +165,7 @@
      *
      * <p> 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) }</pre>
      * 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.
      *
      * <p> In the second example, the function returns a different subscriber
      * depending on the status code.
@@ -227,13 +227,13 @@
     @FunctionalInterface
     public interface BodyHandler<T> {
         /**
-         * Returns a {@linkplain BodySubscriber BodySubscriber} considering the
+         * Returns a {@link BodySubscriber BodySubscriber} considering the
          * given response status code and headers. This method is invoked before
          * the actual response body bytes are read and its implementation must
          * return a {@code BodySubscriber} to consume the response body bytes.
          *
-         * <p> The response body can be discarded using one of {@linkplain
-         * #discard() discard} or {@linkplain #replace(Object) replace}.
+         * <p> 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 <Void>} obtained from {@linkplain
+         * BodySubscriber}{@code <Void>} obtained from {@link
          * BodySubscriber#fromSubscriber(Subscriber)}, with the given
          * {@code subscriber}.
          *
@@ -618,12 +618,12 @@
          * BodySubscriber#buffering(BodySubscriber,int) buffering BodySubscriber}
          * that buffers data before delivering it to the downstream subscriber.
          * These {@code BodySubscriber} instances are created by calling
-         * {@linkplain BodySubscriber#buffering(BodySubscriber,int)
+         * {@link BodySubscriber#buffering(BodySubscriber,int)
          * BodySubscriber.buffering} with a subscriber obtained from the given
          * downstream handler and the {@code bufferSize} parameter.
          *
          * @param downstreamHandler the downstream handler
-         * @param bufferSize the buffer size parameter passed to {@linkplain
+         * @param bufferSize the buffer size parameter passed to {@link
          *        BodySubscriber#buffering(BodySubscriber,int) BodySubscriber.buffering}
          * @return a body handler
          * @throws IllegalArgumentException if {@code bufferSize <= 0}
@@ -696,7 +696,7 @@
          * {@code CompletableFuture} that completes with the response
          * corresponding to the key's push request. A push request is rejected /
          * cancelled if there is already an entry in the map whose key is
-         * {@linkplain HttpRequest#equals equal} to it. A push request is
+         * {@link HttpRequest#equals equal} to it. A push request is
          * rejected / cancelled if it  does not have the same origin as its
          * initiating request.
          *
@@ -751,9 +751,9 @@
      *
      * @apiNote To ensure that all resources associated with the corresponding
      * HTTP exchange are properly released, an implementation of {@code
-     * BodySubscriber} should ensure to {@linkplain Flow.Subscription#request
-     * request} more data until one of {@linkplain #onComplete() onComplete} or
-     * {@link #onError(Throwable) onError} are signalled, or {@linkplain
+     * BodySubscriber} should ensure to {@link Flow.Subscription#request
+     * request} more data until one of {@link #onComplete() onComplete} or
+     * {@link #onError(Throwable) onError} are signalled, or {@link
      * Flow.Subscription#request cancel} its {@linkplain
      * #onSubscribe(Flow.Subscription) subscription} if unable or unwilling to
      * do so. Calling {@code cancel} before exhausting the response body data
@@ -824,12 +824,12 @@
 
         /**
          * Returns a body subscriber that forwards all response body to the
-         * given {@code Flow.Subscriber}, lines by lines.
+         * given {@code Flow.Subscriber}, line by line.
          * The {@linkplain #getBody() completion
          * stage} of the returned body subscriber completes after one of the
          * given subscribers {@code onComplete} or {@code onError} has been
          * invoked.
-         * Bytes are decoded using the {@linkplain StandardCharsets#UTF_8
+         * Bytes are decoded using the {@link StandardCharsets#UTF_8
          * UTF-8} charset, and lines are delimited in the manner of
          * {@link BufferedReader#readLine()}.
          *
@@ -852,11 +852,10 @@
 
         /**
          * Returns a body subscriber that forwards all response body to the
-         * given {@code Flow.Subscriber}, lines by lines.
-         * The {@linkplain #getBody() completion
-         * stage} of the returned body subscriber completes after one of the
-         * given subscribers {@code onComplete} or {@code onError} has been
-         * invoked.
+         * given {@code Flow.Subscriber}, line by line. The {@linkplain #getBody()
+         * completion stage} of the returned body subscriber completes after
+         * one of the given subscribers {@code onComplete} or {@code onError}
+         * has been invoked.
          *
          * <p> 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.
          *
          * <p> The returned subscriber delegates its {@link #getBody()} method
          * to the downstream subscriber.
@@ -1107,10 +1106,10 @@
          * given {@code upstream} {@code BodySubscriber}.
          *
          * <p> 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.
          *
          * <p>For example:
          * <pre> {@code  public static <W> BodySubscriber<W> asJSON(Class<W> targetType) {