http-client-branch: minor doc change http-client-branch
authorchegar
Fri, 17 Nov 2017 11:03:38 +0000
branchhttp-client-branch
changeset 55825 5928d92183d2
parent 55824 b922df193260
child 55827 282ec9039187
http-client-branch: minor doc change
src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequest.java
--- a/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequest.java	Fri Nov 17 13:55:41 2017 +0300
+++ b/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequest.java	Fri Nov 17 11:03:38 2017 +0000
@@ -543,19 +543,25 @@
      */
     public abstract HttpHeaders headers();
 
-
     /**
-     * Two {@code HttpRequest} objects are equal if their URI, method and headers
-     * fields are all equal.
+     * Tests this HTTP request instance for equality with the given object.
+     *
+     * <p> If the given object is not an {@code HttpRequest} then this
+     * method returns {@code false}. Two HTTP requests are equal if their URI,
+     * method, and headers fields are all equal.
      *
-     * @param other
-     * @return true if this is equal to other
+     * <p> This method satisfies the general contract of the {@link
+     * Object#equals(Object) Object.equals} method.
+     *
+     * @param obj the object to which this object is to be compared
+     * @return {@code true} if, and only if, the given object is an {@code
+     *         HttpRequest} that is equal to this HTTP request
      */
     @Override
-    public final boolean equals(Object other) {
-       if (! (other instanceof HttpRequest))
+    public final boolean equals(Object obj) {
+       if (! (obj instanceof HttpRequest))
            return false;
-       HttpRequest that = (HttpRequest)other;
+       HttpRequest that = (HttpRequest)obj;
        if (!that.method().equals(this.method()))
            return false;
        if (!that.uri().equals(this.uri()))
@@ -564,12 +570,15 @@
            return false;
        return true;
     }
-
+    
     /**
-     * Returns this object's hash code. The hash code is calculated as the sum of the
-     * hash codes of its method, uri and headers fields.
+     * Computes a hash code for this HTTP request instance.
      *
-     * @return
+     * <p> The hash code is based upon the HTTP request's URI, method, and
+     * header components, and satisfies the general contract of the
+     * {@link Object#hashCode Object.hashCode} method.
+     *
+     * @return the hash-code value for this HTTP request
      */
     public final int hashCode() {
         return method().hashCode()