8213490: Networking area typos and inconsistencies cleanup
authorprappo
Tue, 13 Nov 2018 12:24:34 +0000
changeset 52499 768b1c612100
parent 52498 c3066f7465fa
child 52500 2e64b70c03b1
8213490: Networking area typos and inconsistencies cleanup Reviewed-by: alanb, chegar, dfuchs
src/java.base/share/classes/java/net/CookieManager.java
src/java.base/share/classes/java/net/DatagramSocket.java
src/java.base/share/classes/java/net/HttpCookie.java
src/java.base/share/classes/java/net/IDN.java
src/java.base/share/classes/java/net/InMemoryCookieStore.java
src/java.base/share/classes/java/net/Inet4Address.java
src/java.base/share/classes/java/net/Inet6Address.java
src/java.base/share/classes/java/net/InetAddress.java
src/java.base/share/classes/java/net/NetworkInterface.java
src/java.base/share/classes/java/net/ProxySelector.java
src/java.base/share/classes/java/net/ResponseCache.java
src/java.base/share/classes/java/net/SecureCacheResponse.java
src/java.base/share/classes/java/net/ServerSocket.java
src/java.base/share/classes/java/net/Socket.java
src/java.base/share/classes/java/net/SocketOutputStream.java
src/java.base/share/classes/java/net/SocketPermission.java
src/java.base/share/classes/java/net/SocksSocketImpl.java
src/java.base/share/classes/java/net/URI.java
src/java.base/share/classes/java/net/URL.java
src/java.base/share/classes/java/net/URLEncoder.java
src/java.base/share/classes/java/net/URLPermission.java
src/java.base/share/classes/java/net/URLStreamHandler.java
src/java.base/share/classes/java/net/spi/URLStreamHandlerProvider.java
src/java.base/share/classes/java/nio/channels/MulticastChannel.java
src/java.base/share/classes/sun/net/NetworkClient.java
src/java.base/share/classes/sun/net/ftp/impl/FtpClient.java
src/java.base/share/classes/sun/net/util/IPAddressUtil.java
src/java.base/share/classes/sun/net/www/URLConnection.java
src/java.base/share/classes/sun/net/www/protocol/http/AuthCacheValue.java
src/java.base/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java
src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java
src/java.base/unix/native/libnet/ResolverConfigurationImpl.c
src/java.base/unix/native/libnet/net_util_md.c
src/java.base/windows/classes/sun/net/dns/ResolverConfigurationImpl.java
src/java.base/windows/native/libnet/net_util_md.c
src/java.net.http/share/classes/java/net/http/HttpRequest.java
src/java.net.http/share/classes/jdk/internal/net/http/AuthenticationFilter.java
src/java.net.http/share/classes/jdk/internal/net/http/Http1AsyncReceiver.java
src/java.net.http/share/classes/jdk/internal/net/http/Http2Connection.java
src/java.net.http/share/classes/jdk/internal/net/http/HttpClientImpl.java
src/java.net.http/share/classes/jdk/internal/net/http/SocketTube.java
src/java.net.http/share/classes/jdk/internal/net/http/Stream.java
--- a/src/java.base/share/classes/java/net/CookieManager.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/CookieManager.java	Tue Nov 13 12:24:34 2018 +0000
@@ -62,7 +62,7 @@
  * <ul>
  *   <li>
  *     CookieHandler is at the core of cookie management. User can call
- *     CookieHandler.setDefault to set a concrete CookieHanlder implementation
+ *     CookieHandler.setDefault to set a concrete CookieHandler implementation
  *     to be used.
  *   </li>
  *   <li>
@@ -354,7 +354,7 @@
     private boolean shouldAcceptInternal(URI uri, HttpCookie cookie) {
         try {
             return policyCallback.shouldAccept(uri, cookie);
-        } catch (Exception ignored) { // pretect against malicious callback
+        } catch (Exception ignored) { // protect against malicious callback
             return false;
         }
     }
--- a/src/java.base/share/classes/java/net/DatagramSocket.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/DatagramSocket.java	Tue Nov 13 12:24:34 2018 +0000
@@ -304,7 +304,7 @@
     private void checkOldImpl() {
         if (impl == null)
             return;
-        // DatagramSocketImpl.peekdata() is a protected method, therefore we need to use
+        // DatagramSocketImpl.peekData() is a protected method, therefore we need to use
         // getDeclaredMethod, therefore we need permission to access the member
         try {
             AccessController.doPrivileged(
@@ -660,7 +660,7 @@
                 throw new SocketException("Socket is closed");
             checkAddress (p.getAddress(), "send");
             if (connectState == ST_NOT_CONNECTED) {
-                // check the address is ok wiht the security manager on every send.
+                // check the address is ok with the security manager on every send.
                 SecurityManager security = System.getSecurityManager();
 
                 // The reason you want to synchronize on datagram packet
@@ -1070,7 +1070,7 @@
      *
      * @param on  whether to enable or disable the
      * @exception SocketException if an error occurs enabling or
-     *            disabling the {@code SO_RESUEADDR} socket option,
+     *            disabling the {@code SO_REUSEADDR} socket option,
      *            or the socket is closed.
      * @since 1.4
      * @see #getReuseAddress()
--- a/src/java.base/share/classes/java/net/HttpCookie.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/HttpCookie.java	Tue Nov 13 12:24:34 2018 +0000
@@ -666,7 +666,7 @@
         int domainLength = domain.length();
         int lengthDiff = host.length() - domainLength;
         if (lengthDiff == 0) {
-            // if the host name and the domain name are just string-compare euqal
+            // if the host name and the domain name are just string-compare equal
             return host.equalsIgnoreCase(domain);
         }
         else if (lengthDiff > 0) {
@@ -1131,7 +1131,7 @@
      * Split cookie header string according to rfc 2965:
      *   1) split where it is a comma;
      *   2) but not the comma surrounding by double-quotes, which is the comma
-     *      inside port list or embeded URIs.
+     *      inside port list or embedded URIs.
      *
      * @param  header
      *         the cookie header string to split
--- a/src/java.base/share/classes/java/net/IDN.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/IDN.java	Tue Nov 13 12:24:34 2018 +0000
@@ -407,7 +407,7 @@
     // 26-letter Latin alphabet <A-Z a-z>, the digits <0-9>, and the hyphen
     // <->.
     // Non LDH refers to characters in the ASCII range, but which are not
-    // letters, digits or the hypen.
+    // letters, digits or the hyphen.
     //
     // non-LDH = 0..0x2C, 0x2E..0x2F, 0x3A..0x40, 0x5B..0x60, 0x7B..0x7F
     //
--- a/src/java.base/share/classes/java/net/InMemoryCookieStore.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/InMemoryCookieStore.java	Tue Nov 13 12:24:34 2018 +0000
@@ -54,7 +54,7 @@
     private Map<String, List<HttpCookie>> domainIndex = null;
     private Map<URI, List<HttpCookie>> uriIndex = null;
 
-    // use ReentrantLock instead of syncronized for scalability
+    // use ReentrantLock instead of synchronized for scalability
     private ReentrantLock lock = null;
 
 
@@ -260,7 +260,7 @@
         int domainLength = domain.length();
         int lengthDiff = host.length() - domainLength;
         if (lengthDiff == 0) {
-            // if the host name and the domain name are just string-compare euqal
+            // if the host name and the domain name are just string-compare equal
             return host.equalsIgnoreCase(domain);
         } else if (lengthDiff > 0) {
             // need to check H & D component
@@ -301,7 +301,7 @@
                             toRemove.add(c);
                         }
                     } else {
-                        // the cookie has beed removed from main store,
+                        // the cookie has been removed from main store,
                         // so also remove it from domain indexed store
                         toRemove.add(c);
                     }
@@ -345,7 +345,7 @@
                                 cookieJar.remove(ck);
                             }
                         } else {
-                            // the cookie has beed removed from main store,
+                            // the cookie has been removed from main store,
                             // so also remove it from domain indexed store
                             it.remove();
                         }
--- a/src/java.base/share/classes/java/net/Inet4Address.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/Inet4Address.java	Tue Nov 13 12:24:34 2018 +0000
@@ -164,7 +164,7 @@
 
     /**
      * Utility routine to check if the InetAddress is a wildcard address.
-     * @return a {@code boolean} indicating if the Inetaddress is
+     * @return a {@code boolean} indicating if the InetAddress is
      *         a wildcard address.
      */
     public boolean isAnyLocalAddress() {
--- a/src/java.base/share/classes/java/net/Inet6Address.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/Inet6Address.java	Tue Nov 13 12:24:34 2018 +0000
@@ -415,7 +415,7 @@
      * set to the value corresponding to the given interface for the address
      * type specified in {@code addr}. The call will fail with an
      * UnknownHostException if the given interface does not have a numeric
-     * scope_id assigned for the given address type (eg. link-local or site-local).
+     * scope_id assigned for the given address type (e.g. link-local or site-local).
      * See <a href="Inet6Address.html#scoped">here</a> for a description of IPv6
      * scoped addresses.
      *
@@ -507,7 +507,7 @@
 
     /* check the two Ipv6 addresses and return false if they are both
      * non global address types, but not the same.
-     * (ie. one is sitelocal and the other linklocal)
+     * (i.e. one is site-local and the other link-local)
      * return true otherwise.
      */
 
@@ -683,7 +683,7 @@
     /**
      * Utility routine to check if the InetAddress is a wildcard address.
      *
-     * @return a {@code boolean} indicating if the Inetaddress is
+     * @return a {@code boolean} indicating if the InetAddress is
      *         a wildcard address.
      */
     @Override
@@ -821,7 +821,7 @@
 
     /**
      * Returns the scoped interface, if this instance was created with
-     * with a scoped interface.
+     * a scoped interface.
      *
      * @return the scoped interface, or null if not set.
      * @since 1.5
--- a/src/java.base/share/classes/java/net/InetAddress.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/InetAddress.java	Tue Nov 13 12:24:34 2018 +0000
@@ -377,7 +377,7 @@
 
     /**
      * Utility routine to check if the InetAddress is a wildcard address.
-     * @return a {@code boolean} indicating if the Inetaddress is
+     * @return a {@code boolean} indicating if the InetAddress is
      *         a wildcard address.
      * @since 1.4
      */
@@ -1022,7 +1022,7 @@
          * <p>Lookup a host mapping by name. Retrieve the IP addresses
          * associated with a host.
          *
-         * <p>Search the configured hosts file for the addresses assocaited with
+         * <p>Search the configured hosts file for the addresses associated
          * with the specified host name.
          *
          * @param host the specified hostname
@@ -1038,7 +1038,7 @@
             byte addr[] = new byte[4];
             ArrayList<InetAddress> inetAddresses = null;
 
-            // lookup the file and create a list InetAddress for the specfied host
+            // lookup the file and create a list InetAddress for the specified host
             try (Scanner hostsFileScanner = new Scanner(new File(hostsFile), "UTF-8")) {
                 while (hostsFileScanner.hasNextLine()) {
                     hostEntry = hostsFileScanner.nextLine();
@@ -1341,7 +1341,7 @@
                     throw new UnknownHostException(host + ": invalid IPv6 address");
                 }
             } else if (ipv6Expected) {
-                // Means an IPv4 litteral between brackets!
+                // Means an IPv4 literal between brackets!
                 throw new UnknownHostException("["+host+"]");
             }
             InetAddress[] ret = new InetAddress[1];
@@ -1358,7 +1358,7 @@
                 return ret;
             }
         } else if (ipv6Expected) {
-            // We were expecting an IPv6 Litteral, but got something else
+            // We were expecting an IPv6 Literal, but got something else
             throw new UnknownHostException("["+host+"]");
         }
         return getAllByName0(host, reqAddr, true, true);
--- a/src/java.base/share/classes/java/net/NetworkInterface.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/NetworkInterface.java	Tue Nov 13 12:24:34 2018 +0000
@@ -170,7 +170,7 @@
      * a SecurityException will be returned in the List.
      *
      * @return a {@code List} object with all or a subset of the
-     *         InterfaceAddresss of this network interface
+     *         InterfaceAddress of this network interface
      * @since 1.6
      */
     public java.util.List<InterfaceAddress> getInterfaceAddresses() {
--- a/src/java.base/share/classes/java/net/ProxySelector.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/ProxySelector.java	Tue Nov 13 12:24:34 2018 +0000
@@ -136,7 +136,7 @@
      * @param   uri
      *          The URI that a connection is required to
      *
-     * @return  a List of Proxies. Each element in the
+     * @return  a List of Proxies. Each element in
      *          the List is of type
      *          {@link java.net.Proxy Proxy};
      *          when no proxy is available, the list will
--- a/src/java.base/share/classes/java/net/ResponseCache.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/ResponseCache.java	Tue Nov 13 12:24:34 2018 +0000
@@ -91,7 +91,7 @@
     /**
      * Sets (or unsets) the system-wide cache.
      *
-     * Note: non-standard procotol handlers may ignore this setting.
+     * Note: non-standard protocol handlers may ignore this setting.
      *
      * @param responseCache The response cache, or
      *          {@code null} to unset the cache.
--- a/src/java.base/share/classes/java/net/SecureCacheResponse.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/SecureCacheResponse.java	Tue Nov 13 12:24:34 2018 +0000
@@ -82,7 +82,7 @@
      * retrieved the network resource.
      *
      * @return the server's principal. Returns an X500Principal of the
-     * end-entity certiticate for X509-based cipher suites, and
+     * end-entity certificate for X509-based cipher suites, and
      * KerberosPrincipal for Kerberos cipher suites.
      *
      * @throws SSLPeerUnverifiedException if the peer was not verified.
--- a/src/java.base/share/classes/java/net/ServerSocket.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/ServerSocket.java	Tue Nov 13 12:24:34 2018 +0000
@@ -166,7 +166,7 @@
      * The {@code backlog} argument is the requested maximum number of
      * pending connections on the socket. Its exact semantics are implementation
      * specific. In particular, an implementation may impose a maximum length
-     * or may choose to ignore the parameter altogther. The value provided
+     * or may choose to ignore the parameter altogether. The value provided
      * should be greater than {@code 0}. If it is less than or equal to
      * {@code 0}, then an implementation specific default will be used.
      *
@@ -214,7 +214,7 @@
      * The {@code backlog} argument is the requested maximum number of
      * pending connections on the socket. Its exact semantics are implementation
      * specific. In particular, an implementation may impose a maximum length
-     * or may choose to ignore the parameter altogther. The value provided
+     * or may choose to ignore the parameter altogether. The value provided
      * should be greater than {@code 0}. If it is less than or equal to
      * {@code 0}, then an implementation specific default will be used.
      *
@@ -351,7 +351,7 @@
      * The {@code backlog} argument is the requested maximum number of
      * pending connections on the socket. Its exact semantics are implementation
      * specific. In particular, an implementation may impose a maximum length
-     * or may choose to ignore the parameter altogther. The value provided
+     * or may choose to ignore the parameter altogether. The value provided
      * should be greater than {@code 0}. If it is less than or equal to
      * {@code 0}, then an implementation specific default will be used.
      * @param   endpoint        The IP address and port number to bind to.
@@ -826,7 +826,7 @@
      * <p>
      * The value of {@link SocketOptions#SO_RCVBUF SO_RCVBUF} is used both to
      * set the size of the internal socket receive buffer, and to set the size
-     * of the TCP receive window that is advertized to the remote peer.
+     * of the TCP receive window that is advertised to the remote peer.
      * <p>
      * It is possible to change the value subsequently, by calling
      * {@link Socket#setReceiveBufferSize(int)}. However, if the application
--- a/src/java.base/share/classes/java/net/Socket.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/Socket.java	Tue Nov 13 12:24:34 2018 +0000
@@ -1237,7 +1237,7 @@
      * should call {@link #getReceiveBufferSize()}.
      *
      * <p>The value of {@link SocketOptions#SO_RCVBUF SO_RCVBUF} is also used
-     * to set the TCP receive window that is advertized to the remote peer.
+     * to set the TCP receive window that is advertised to the remote peer.
      * Generally, the window size can be modified at any time when a socket is
      * connected. However, if a receive window larger than 64K is required then
      * this must be requested <B>before</B> the socket is connected to the
@@ -1578,10 +1578,10 @@
      * <p>
      * Note: Closing a socket doesn't clear its connection state, which means
      * this method will return {@code true} for a closed socket
-     * (see {@link #isClosed()}) if it was successfuly connected prior
+     * (see {@link #isClosed()}) if it was successfully connected prior
      * to being closed.
      *
-     * @return true if the socket was successfuly connected to a server
+     * @return true if the socket was successfully connected to a server
      * @since 1.4
      */
     public boolean isConnected() {
@@ -1594,10 +1594,10 @@
      * <p>
      * Note: Closing a socket doesn't clear its binding state, which means
      * this method will return {@code true} for a closed socket
-     * (see {@link #isClosed()}) if it was successfuly bound prior
+     * (see {@link #isClosed()}) if it was successfully bound prior
      * to being closed.
      *
-     * @return true if the socket was successfuly bound to an address
+     * @return true if the socket was successfully bound to an address
      * @since 1.4
      * @see #bind
      */
--- a/src/java.base/share/classes/java/net/SocketOutputStream.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/SocketOutputStream.java	Tue Nov 13 12:24:34 2018 +0000
@@ -51,7 +51,7 @@
      * Creates a new SocketOutputStream. Can only be called
      * by a Socket. This method needs to hang on to the owner Socket so
      * that the fd will not be closed.
-     * @param impl the socket output stream inplemented
+     * @param impl the socket output stream implemented
      */
     SocketOutputStream(AbstractPlainSocketImpl impl) throws IOException {
         super(impl.getFileDescriptor());
--- a/src/java.base/share/classes/java/net/SocketPermission.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/SocketPermission.java	Tue Nov 13 12:24:34 2018 +0000
@@ -283,7 +283,7 @@
      *    nr = new SocketPermission("204.160.241.0:1024-65535", "connect");
      * </pre>
      *
-     * @param host the hostname or IPaddress of the computer, optionally
+     * @param host the hostname or IP address of the computer, optionally
      * including a colon followed by a port or port range.
      * @param action the action string.
      */
@@ -317,7 +317,7 @@
                 if ((ind = host.indexOf(':')) != host.lastIndexOf(':')) {
                     /* More than one ":", meaning IPv6 address is not
                      * in RFC 2732 format;
-                     * We will rectify user errors for all unambiguious cases
+                     * We will rectify user errors for all unambiguous cases
                      */
                     StringTokenizer st = new StringTokenizer(host, ":");
                     int tokens = st.countTokens();
@@ -961,7 +961,7 @@
                 return (that.cname.endsWith(this.cname));
             }
 
-            // comapare IP addresses
+            // compare IP addresses
             if (this.addresses == null) {
                 this.getIP();
             }
--- a/src/java.base/share/classes/java/net/SocksSocketImpl.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/SocksSocketImpl.java	Tue Nov 13 12:24:34 2018 +0000
@@ -51,7 +51,7 @@
     private Socket cmdsock = null;
     private InputStream cmdIn = null;
     private OutputStream cmdOut = null;
-    /* true if the Proxy has been set programatically */
+    /* true if the Proxy has been set programmatically */
     private boolean applicationSetProxy;  /* false */
 
 
@@ -145,7 +145,7 @@
     }
 
     /**
-     * Provides the authentication machanism required by the proxy.
+     * Provides the authentication mechanism required by the proxy.
      */
     private boolean authenticate(byte method, InputStream in,
                                  BufferedOutputStream out) throws IOException {
@@ -158,7 +158,7 @@
         // No Authentication required. We're done then!
         if (method == NO_AUTH)
             return true;
-        /**
+        /*
          * User/Password authentication. Try, in that order :
          * - The application provided Authenticator, if any
          * - the user.name & no password (backward compatibility behavior).
@@ -377,7 +377,7 @@
             URI uri;
             // Use getHostString() to avoid reverse lookups
             String host = epoint.getHostString();
-            // IPv6 litteral?
+            // IPv6 literal?
             if (epoint.getAddress() instanceof Inet6Address &&
                 (!host.startsWith("[")) && (host.indexOf(':') >= 0)) {
                 host = "[" + host + "]";
@@ -692,7 +692,7 @@
             URI uri;
             // Use getHostString() to avoid reverse lookups
             String host = saddr.getHostString();
-            // IPv6 litteral?
+            // IPv6 literal?
             if (saddr.getAddress() instanceof Inet6Address &&
                 (!host.startsWith("[")) && (host.indexOf(':') >= 0)) {
                 host = "[" + host + "]";
--- a/src/java.base/share/classes/java/net/URI.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/URI.java	Tue Nov 13 12:24:34 2018 +0000
@@ -861,9 +861,9 @@
      *
      * <p> This method is provided for use in situations where it is known that
      * the given string is a legal URI, for example for URI constants declared
-     * within in a program, and so it would be considered a programming error
+     * within a program, and so it would be considered a programming error
      * for the string not to parse as such.  The constructors, which throw
-     * {@link URISyntaxException} directly, should be used situations where a
+     * {@link URISyntaxException} directly, should be used in situations where a
      * URI is being constructed from user input or from some other source that
      * may be prone to errors.  </p>
      *
--- a/src/java.base/share/classes/java/net/URL.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/URL.java	Tue Nov 13 12:24:34 2018 +0000
@@ -1009,7 +1009,7 @@
      * can not be converted to a URI.
      *
      * @exception URISyntaxException if this URL is not formatted strictly according to
-     *            to RFC2396 and cannot be converted to a URI.
+     *            RFC2396 and cannot be converted to a URI.
      *
      * @return    a URI instance equivalent to this URL.
      * @since 1.5
@@ -1054,7 +1054,7 @@
     /**
      * Same as {@link #openConnection()}, except that the connection will be
      * made through the specified proxy; Protocol handlers that do not
-     * support proxing will ignore the proxy parameter and make a
+     * support proxying will ignore the proxy parameter and make a
      * normal connection.
      *
      * Invoking this method preempts the system's default
--- a/src/java.base/share/classes/java/net/URLEncoder.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/URLEncoder.java	Tue Nov 13 12:24:34 2018 +0000
@@ -109,7 +109,7 @@
          * list. It is also noteworthy that this is consistent with
          * O'Reilly's "HTML: The Definitive Guide" (page 164).
          *
-         * As a last note, Intenet Explorer does not encode the "@"
+         * As a last note, Internet Explorer does not encode the "@"
          * character which is clearly not unreserved according to the
          * RFC. We are being consistent with the RFC in this matter,
          * as is Netscape.
--- a/src/java.base/share/classes/java/net/URLPermission.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/URLPermission.java	Tue Nov 13 12:24:34 2018 +0000
@@ -51,7 +51,7 @@
  *     portrange = portnumber | -portnumber | portnumber-[portnumber] | *
  *     hostrange = ([*.] dnsname) | IPv4address | IPv6address
  * </pre>
- * <i>dnsname</i> is a standard DNS host or domain name, ie. one or more labels
+ * <i>dnsname</i> is a standard DNS host or domain name, i.e. one or more labels
  * separated by ".". <i>IPv4address</i> is a standard literal IPv4 address and
  * <i>IPv6address</i> is as defined in <a href="http://www.ietf.org/rfc/rfc2732.txt">
  * RFC 2732</a>. Literal IPv6 addresses must however, be enclosed in '[]' characters.
@@ -89,7 +89,7 @@
  * </tr>
  * <tr><th scope="row">http://www.oracle.com/a/b/-</th>
  *   <td>The '-' character refers to all resources recursively below the
- *       preceding path (eg. http://www.oracle.com/a/b/c/d/e.html matches this
+ *       preceding path (e.g. http://www.oracle.com/a/b/c/d/e.html matches this
  *       example).
  *   </td>
  * </tr>
--- a/src/java.base/share/classes/java/net/URLStreamHandler.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/URLStreamHandler.java	Tue Nov 13 12:24:34 2018 +0000
@@ -250,15 +250,15 @@
             } else if (path != null && path.length() > 0) {
                 isRelPath = true;
                 int ind = path.lastIndexOf('/');
-                String seperator = "";
+                String separator = "";
                 if (ind == -1 && authority != null)
-                    seperator = "/";
-                path = path.substring(0, ind + 1) + seperator +
+                    separator = "/";
+                path = path.substring(0, ind + 1) + separator +
                          spec.substring(start, limit);
 
             } else {
-                String seperator = (authority != null) ? "/" : "";
-                path = seperator + spec.substring(start, limit);
+                String separator = (authority != null) ? "/" : "";
+                path = separator + spec.substring(start, limit);
             }
         } else if (queryOnly && path != null) {
             int ind = path.lastIndexOf('/');
@@ -314,7 +314,7 @@
 
     /**
      * Returns the default port for a URL parsed by this handler. This method
-     * is meant to be overidden by handlers with default port numbers.
+     * is meant to be overridden by handlers with default port numbers.
      * @return the default port for a {@code URL} parsed by this handler.
      * @since 1.3
      */
@@ -323,14 +323,14 @@
     }
 
     /**
-     * Provides the default equals calculation. May be overidden by handlers
+     * Provides the default equals calculation. May be overridden by handlers
      * for other protocols that have different requirements for equals().
      * This method requires that none of its arguments is null. This is
      * guaranteed by the fact that it is only called by java.net.URL class.
      * @param u1 a URL object
      * @param u2 a URL object
      * @return {@code true} if the two urls are
-     * considered equal, ie. they refer to the same
+     * considered equal, i.e. they refer to the same
      * fragment in the same file.
      * @since 1.3
      */
@@ -342,7 +342,7 @@
     }
 
     /**
-     * Provides the default hash calculation. May be overidden by handlers for
+     * Provides the default hash calculation. May be overridden by handlers for
      * other protocols that have different requirements for hashCode
      * calculation.
      * @param u a URL object
--- a/src/java.base/share/classes/java/net/spi/URLStreamHandlerProvider.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/net/spi/URLStreamHandlerProvider.java	Tue Nov 13 12:24:34 2018 +0000
@@ -30,7 +30,7 @@
 /**
  * URL stream handler service-provider class.
  *
- *<p> A URL stream handler provider is a concrete subclass of this class that
+ * <p> A URL stream handler provider is a concrete subclass of this class that
  * has a zero-argument constructor. URL stream handler providers may be
  * installed in an instance of the Java platform by adding them to the
  * application class path.
--- a/src/java.base/share/classes/java/nio/channels/MulticastChannel.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/java/nio/channels/MulticastChannel.java	Tue Nov 13 12:24:34 2018 +0000
@@ -177,7 +177,7 @@
      * @throws  SecurityException
      *          If a security manager is set, and its
      *          {@link SecurityManager#checkMulticast(InetAddress) checkMulticast}
-     *          method denies access to the multiast group
+     *          method denies access to the multicast group
      */
     MembershipKey join(InetAddress group, NetworkInterface interf)
         throws IOException;
@@ -226,7 +226,7 @@
      * @throws  SecurityException
      *          If a security manager is set, and its
      *          {@link SecurityManager#checkMulticast(InetAddress) checkMulticast}
-     *          method denies access to the multiast group
+     *          method denies access to the multicast group
      */
     MembershipKey join(InetAddress group, NetworkInterface interf, InetAddress source)
         throws IOException;
--- a/src/java.base/share/classes/sun/net/NetworkClient.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/sun/net/NetworkClient.java	Tue Nov 13 12:24:34 2018 +0000
@@ -101,7 +101,7 @@
      * the NetworkClients will not work correctly in EBCDIC based systems.
      * However, we cannot just use ASCII or ISO8859_1 universally, because in
      * Asian locales, non-ASCII characters may be embedded in otherwise
-     * ASCII based protocols (eg. HTTP). The specifications (RFC2616, 2398)
+     * ASCII based protocols (e.g. HTTP). The specifications (RFC2616, 2398)
      * are a little ambiguous in this matter. For instance, RFC2398 [part 2.1]
      * says that the HTTP request URI should be escaped using a defined
      * mechanism, but there is no way to specify in the escaped string what
--- a/src/java.base/share/classes/sun/net/ftp/impl/FtpClient.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/sun/net/ftp/impl/FtpClient.java	Tue Nov 13 12:24:34 2018 +0000
@@ -154,7 +154,7 @@
      * the NetworkClients will not work correctly in EBCDIC based systems.
      * However, we cannot just use ASCII or ISO8859_1 universally, because in
      * Asian locales, non-ASCII characters may be embedded in otherwise
-     * ASCII based protocols (eg. HTTP). The specifications (RFC2616, 2398)
+     * ASCII based protocols (e.g. HTTP). The specifications (RFC2616, 2398)
      * are a little ambiguous in this matter. For instance, RFC2398 [part 2.1]
      * says that the HTTP request URI should be escaped using a defined
      * mechanism, but there is no way to specify in the escaped string what
--- a/src/java.base/share/classes/sun/net/util/IPAddressUtil.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/sun/net/util/IPAddressUtil.java	Tue Nov 13 12:24:34 2018 +0000
@@ -184,7 +184,7 @@
             }
             if (ch == '.' && ((j + INADDR4SZ) <= INADDR16SZ)) {
                 String ia4 = src.substring(curtok, srcb_length);
-                /* check this IPv4 address has 3 dots, ie. A.B.C.D */
+                /* check this IPv4 address has 3 dots, i.e. A.B.C.D */
                 int dot_count = 0, index=0;
                 while ((index = ia4.indexOf ('.', index)) != -1) {
                     dot_count ++;
--- a/src/java.base/share/classes/sun/net/www/URLConnection.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/sun/net/www/URLConnection.java	Tue Nov 13 12:24:34 2018 +0000
@@ -183,7 +183,7 @@
      * @param   type    The content type to use.  One of the
      *                  content_* static variables in this
      *                  class should be used.
-     *                  eg. setType(URL.content_html);
+     *                  e.g. setType(URL.content_html);
      */
     public void setContentType(String type) {
         contentType = type;
--- a/src/java.base/share/classes/sun/net/www/protocol/http/AuthCacheValue.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/sun/net/www/protocol/http/AuthCacheValue.java	Tue Nov 13 12:24:34 2018 +0000
@@ -30,7 +30,7 @@
 
 /**
  * AuthCacheValue: interface to minimize exposure to authentication cache
- * for external users (ie. plugin)
+ * for external users (i.e. plugin)
  *
  * @author Michael McMahon
  */
--- a/src/java.base/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/sun/net/www/protocol/http/AuthenticationInfo.java	Tue Nov 13 12:24:34 2018 +0000
@@ -119,7 +119,7 @@
     /**
      * requests is used to ensure that interaction with the
      * Authenticator for a particular realm is single threaded.
-     * ie. if multiple threads need to get credentials from the user
+     * i.e. if multiple threads need to get credentials from the user
      * at the same time, then all but the first will block until
      * the first completes its authentication.
      */
--- a/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/share/classes/sun/net/www/protocol/http/HttpURLConnection.java	Tue Nov 13 12:24:34 2018 +0000
@@ -246,7 +246,7 @@
         userAgent = agent;
 
         // A set of net properties to control the use of authentication schemes
-        // when proxing/tunneling.
+        // when proxying/tunneling.
         String p = getNetProperty("jdk.http.auth.tunneling.disabledSchemes");
         disabledTunnelingSchemes = schemesListToSet(p);
         p = getNetProperty("jdk.http.auth.proxying.disabledSchemes");
@@ -3590,7 +3590,7 @@
         /**
          * expectedLength == -1 if the stream is chunked
          * expectedLength > 0 if the stream is fixed content-length
-         *    In the 2nd case, we make sure the expected number of
+         *    In the 2nd case, we make sure the expected number
          *    of bytes are actually written
          */
         StreamingOutputStream (OutputStream os, long expectedLength) {
--- a/src/java.base/unix/native/libnet/ResolverConfigurationImpl.c	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/unix/native/libnet/ResolverConfigurationImpl.c	Tue Nov 13 12:24:34 2018 +0000
@@ -42,7 +42,7 @@
 
 
 /*
- * Class:     sun_net_dns_ResolverConfgurationImpl
+ * Class:     sun_net_dns_ResolverConfigurationImpl
  * Method:    localDomain0
  * Signature: ()Ljava/lang/String;
  */
@@ -66,7 +66,7 @@
 }
 
 /*
- * Class:     sun_net_dns_ResolverConfgurationImpl
+ * Class:     sun_net_dns_ResolverConfigurationImpl
  * Method:    loadConfig0
  * Signature: ()Ljava/lang/String;
  */
--- a/src/java.base/unix/native/libnet/net_util_md.c	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/unix/native/libnet/net_util_md.c	Tue Nov 13 12:24:34 2018 +0000
@@ -1087,7 +1087,7 @@
              * dest_plen % 8    => number of additional bits to match
              *
              * eg: fe80::/10 => match 1 byte + 2 additional bits in the
-             *                  the next byte.
+             *                  next byte.
              */
             int byte_count = dest_plen >> 3;
             int extra_bits = dest_plen & 0x3;
--- a/src/java.base/windows/classes/sun/net/dns/ResolverConfigurationImpl.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/windows/classes/sun/net/dns/ResolverConfigurationImpl.java	Tue Nov 13 12:24:34 2018 +0000
@@ -36,13 +36,13 @@
 public class ResolverConfigurationImpl
     extends ResolverConfiguration
 {
-    // Lock helds whilst loading configuration or checking
+    // Lock held whilst loading configuration or checking
     private static Object lock = new Object();
 
     // Resolver options
     private final Options opts;
 
-    // Addreses have changed
+    // Addresses have changed
     private static boolean changed = false;
 
     // Time of last refresh.
@@ -65,7 +65,7 @@
     private LinkedList<String> stringToList(String str) {
         LinkedList<String> ll = new LinkedList<>();
 
-        // comma and space are valid delimites
+        // comma and space are valid delimiters
         StringTokenizer st = new StringTokenizer(str, ", ");
         while (st.hasMoreTokens()) {
             String s = st.nextToken();
@@ -81,7 +81,7 @@
     private void loadConfig() {
         assert Thread.holdsLock(lock);
 
-        // if address have changed then DNS probably changed aswell;
+        // if address have changed then DNS probably changed as well;
         // otherwise check if cached settings have expired.
         //
         if (changed) {
--- a/src/java.base/windows/native/libnet/net_util_md.c	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.base/windows/native/libnet/net_util_md.c	Tue Nov 13 12:24:34 2018 +0000
@@ -585,7 +585,7 @@
  * The more complicated case is when the requested address is ::0 or 0.0.0.0.
  *
  * Two further cases:
- * 2. If the reqeusted port is 0 (ie. any port) then we try to bind in v4 space
+ * 2. If the requested port is 0 (ie. any port) then we try to bind in v4 space
  *    first with a wild-card port argument. We then try to bind in v6 space
  *    using the returned port number. If this fails, we repeat the process
  *    until a free port common to both spaces becomes available.
--- a/src/java.net.http/share/classes/java/net/http/HttpRequest.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.net.http/share/classes/java/net/http/HttpRequest.java	Tue Nov 13 12:24:34 2018 +0000
@@ -191,8 +191,8 @@
          * {@link HttpClient#sendAsync(java.net.http.HttpRequest,
          * java.net.http.HttpResponse.BodyHandler) HttpClient::sendAsync}
          * completes exceptionally with an {@code HttpTimeoutException}. The effect
-         * of not setting a timeout is the same as setting an infinite Duration, ie.
-         * block forever.
+         * of not setting a timeout is the same as setting an infinite Duration,
+         * i.e. block forever.
          *
          * @param duration the timeout duration
          * @return this builder
--- a/src/java.net.http/share/classes/jdk/internal/net/http/AuthenticationFilter.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.net.http/share/classes/jdk/internal/net/http/AuthenticationFilter.java	Tue Nov 13 12:24:34 2018 +0000
@@ -127,7 +127,7 @@
         }
 
         // our own private scheme for proxy URLs
-        // eg. proxy.http://host:port/
+        // e.g. proxy.http://host:port/
         String scheme = "proxy." + r.uri().getScheme();
         try {
             return new URI(scheme,
--- a/src/java.net.http/share/classes/jdk/internal/net/http/Http1AsyncReceiver.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.net.http/share/classes/jdk/internal/net/http/Http1AsyncReceiver.java	Tue Nov 13 12:24:34 2018 +0000
@@ -282,7 +282,7 @@
         // The most recently subscribed delegate will get the error.
         // If the delegate is null, the error will be handled by the next
         // delegate that subscribes.
-        // If the queue is not empty, wait until it it is empty before
+        // If the queue is not empty, wait until it is empty before
         // handling the error.
         Http1AsyncDelegate delegate = pendingDelegateRef.get();
         if (delegate == null) delegate = this.delegate;
--- a/src/java.net.http/share/classes/jdk/internal/net/http/Http2Connection.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.net.http/share/classes/jdk/internal/net/http/Http2Connection.java	Tue Nov 13 12:24:34 2018 +0000
@@ -414,7 +414,7 @@
 
     // call these before assigning a request/stream to a connection
     // if false returned then a new Http2Connection is required
-    // if true, the the stream may be assigned to this connection
+    // if true, the stream may be assigned to this connection
     // for server push, if false returned, then the stream should be cancelled
     synchronized boolean reserveStream(boolean clientInitiated) throws IOException {
         if (finalStream) {
--- a/src/java.net.http/share/classes/jdk/internal/net/http/HttpClientImpl.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.net.http/share/classes/jdk/internal/net/http/HttpClientImpl.java	Tue Nov 13 12:24:34 2018 +0000
@@ -211,7 +211,7 @@
     //    from the map. This should also take care of push promises.
     // 2. For WebSocket the count is increased when creating a
     //    DetachedConnectionChannel for the socket, and decreased
-    //    when the the channel is closed.
+    //    when the channel is closed.
     //    In addition, the HttpClient facade is passed to the WebSocket builder,
     //    (instead of the client implementation delegate).
     // 3. For HTTP/1.1 the count is incremented before starting to parse the body
--- a/src/java.net.http/share/classes/jdk/internal/net/http/SocketTube.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.net.http/share/classes/jdk/internal/net/http/SocketTube.java	Tue Nov 13 12:24:34 2018 +0000
@@ -322,7 +322,7 @@
         // onNext is usually called from within a user / executor thread.
         // Initial writing will be performed in that thread. If for some reason,
         // not all the data can be written, a writeEvent will be registered, and
-        // writing will resume in the the selector manager thread when the
+        // writing will resume in the selector manager thread when the
         // writeEvent is fired.
         //
         // If this method is invoked in the selector manager thread (because of
--- a/src/java.net.http/share/classes/jdk/internal/net/http/Stream.java	Tue Nov 13 11:45:16 2018 +0100
+++ b/src/java.net.http/share/classes/jdk/internal/net/http/Stream.java	Tue Nov 13 12:24:34 2018 +0000
@@ -69,7 +69,7 @@
  * RESPONSES
  *
  * Multiple responses can be received per request. Responses are queued up on
- * a LinkedList of CF<HttpResponse> and the the first one on the list is completed
+ * a LinkedList of CF<HttpResponse> and the first one on the list is completed
  * with the next response
  *
  * getResponseAsync() -- queries list of response CFs and returns first one