Looks ok to me. -Chris.
On 26/11/2018 21:38, joe darcy wrote:
Hello, Please review a simple doc-only change to address: JDK-8213911: Use example.com in java.net and other examples http://cr.openjdk.java.net/~darcy/8213911.0/ Patch below. Thanks, -Joe--- old/src/java.base/share/classes/java/net/HostPortrange.java 2018-11-26 13:32:47.078000000 -0800 +++ new/src/java.base/share/classes/java/net/HostPortrange.java 2018-11-26 13:32:46.902000000 -0800@@ -60,7 +60,7 @@ HostPortrange(String scheme, String str) { // Parse the host name. A name has up to three components, the // hostname, a port number, or two numbers representing a port - // range. "www.sun.com:8080-9090" is a valid host name. + // range. "www.example.com:8080-9090" is a valid host name. // With IPv6 an address can be 2010:836B:4179::836B:4179 // An IPv6 address needs to be enclose in []--- old/src/java.base/share/classes/java/net/InetAddress.java 2018-11-26 13:32:47.474000000 -0800 +++ new/src/java.base/share/classes/java/net/InetAddress.java 2018-11-26 13:32:47.298000000 -0800@@ -1168,7 +1168,7 @@ * No name service is checked for the validity of the address. * * <p> The host name can either be a machine name, such as - * "{@code java.sun.com}", or a textual representation of its IP + * "{@code www.example.com}", or a textual representation of its IP * address. * <p> No validity checking is done on the host name either. * @@ -1213,7 +1213,7 @@ * Determines the IP address of a host, given the host's name. * * <p> The host name can either be a machine name, such as - * "{@code java.sun.com}", or a textual representation of its + * "{@code www.example.com}", or a textual representation of its * IP address. If a literal IP address is supplied, only the * validity of the address format is checked. * @@ -1259,7 +1259,7 @@ * based on the configured name service on the system. * * <p> The host name can either be a machine name, such as - * "{@code java.sun.com}", or a textual representation of its IP + * "{@code www.example.com}", or a textual representation of its IP * address. If a literal IP address is supplied, only the * validity of the address format is checked. *--- old/src/java.base/share/classes/java/net/SocketPermission.java 2018-11-26 13:32:47.850000000 -0800 +++ new/src/java.base/share/classes/java/net/SocketPermission.java 2018-11-26 13:32:47.678000000 -0800@@ -63,7 +63,7 @@ * or as "localhost" (for the local machine). * The wildcard "*" may be included once in a DNS name host * specification. If it is included, it must be in the leftmost - * position, as in "*.sun.com". + * position, as in "*.example.com". * <p> * The format of the IPv6reference should follow that specified in <a * href="http://www.ietf.org/rfc/rfc2732.txt"><i>RFC 2732: Format @@ -115,11 +115,11 @@ * note that if the following permission: * * <pre>- * p1 = new SocketPermission("puffin.eng.sun.com:7777", "connect,accept");+ * p1 = new SocketPermission("foo.example.com:7777", "connect,accept"); * </pre> ** is granted to some code, it allows that code to connect to port 7777 on- * {@code puffin.eng.sun.com}, and to accept connections on that port. + * {@code foo.example.com}, and to accept connections on that port. * * <p>Similarly, if the following permission: * @@ -211,7 +211,7 @@ // all the IP addresses of the host private transient InetAddress[] addresses; - // true if the hostname is a wildcard (e.g. "*.sun.com") + // true if the hostname is a wildcard (e.g. "*.example.com") private transient boolean wildcard; // true if we were initialized with a single numeric IP address @@ -274,9 +274,9 @@ * <p> * Examples of SocketPermission instantiation are the following: * <pre> - * nr = new SocketPermission("www.catalog.com", "connect"); - * nr = new SocketPermission("www.sun.com:80", "connect"); - * nr = new SocketPermission("*.sun.com", "connect"); + * nr = new SocketPermission("www.example.com", "connect"); + * nr = new SocketPermission("www.example.com:80", "connect"); + * nr = new SocketPermission("*.example.com", "connect"); * nr = new SocketPermission("*.edu", "resolve"); * nr = new SocketPermission("204.160.241.0", "connect"); * nr = new SocketPermission("localhost:1024-65535", "listen"); @@ -400,7 +400,7 @@ // Parse the host name. A name has up to three components, the // hostname, a port number, or two numbers representing a port - // range. "www.sun.com:8080-9090" is a valid host name. + // range. "www.example.com:8080-9090" is a valid host name. // With IPv6 an address can be 2010:836B:4179::836B:4179 // An IPv6 address needs to be enclose in [] @@ -835,10 +835,10 @@ * <ul>* <li> If this object was initialized with a single IP address and one of <i>p</i>'s* IP addresses is equal to this object's IP address. - * <li>If this object is a wildcard domain (such as *.sun.com), and+ * <li>If this object is a wildcard domain (such as *.example.com), and* <i>p</i>'s canonical name (the name without any preceding *) - * ends with this object's canonical host name. For example, *.sun.com - * implies *.eng.sun.com.+ * ends with this object's canonical host name. For example, *.example.com+ * implies *.foo.example.com.* <li>If this object was not initialized with a single IP address, and one of this* object's IP addresses equals one of <i>p</i>'s IP addresses. * <li>If this canonical name equals <i>p</i>'s canonical name. @@ -878,7 +878,7 @@ * <li> Checks that "p"'s port range is included in this port range* <li> If this object was initialized with an IP address, checks that * one of "p"'s IP addresses is equal to this object's IP address.- * <li> If either object is a wildcard domain (i.e., "*.sun.com"), + * <li> If either object is a wildcard domain (i.e., "*.example.com"), * attempt to match based on the wildcard.* <li> If this object was not initialized with an IP address, attempt* to find a match based on the IP addresses in both objects. @@ -944,8 +944,8 @@ // check and see if we have any wildcards... if (this.wildcard || that.wildcard) { // if they are both wildcards, return true iff - // that's cname ends with this cname (i.e., *.sun.com - // implies *.eng.sun.com) + // that's cname ends with this cname (i.e., *.example.com + // implies *.foo.example.com) if (this.wildcard && that.wildcard) return (that.cname.endsWith(this.cname)); @@ -1057,7 +1057,7 @@ // "1.2.3.4" equal to "1.2.3.4.", or // "*.edu" equal to "*.edu", but it // does not catch "crypto" equal to - // "crypto.eng.sun.com". + // "crypto.foo.example.com". if (this.getName().equalsIgnoreCase(that.getName())) { return true; @@ -1313,7 +1313,7 @@SocketPermissionCollection nps = new SocketPermissionCollection();nps.add(this_);nps.add(new SocketPermission("www-leland.stanford.edu","connect"));- nps.add(new SocketPermission("www-sun.com","connect")); + nps.add(new SocketPermission("www-example.com","connect")); System.out.println("nps.implies(that) = " + nps.implies(that_)); System.out.println("-----\n"); }--- old/src/java.base/share/classes/java/net/URI.java 2018-11-26 13:32:48.246000000 -0800 +++ new/src/java.base/share/classes/java/net/URI.java 2018-11-26 13:32:48.070000000 -0800@@ -83,7 +83,7 @@ * subject to further parsing. Some examples of opaque URIs are: * * <blockquote><ul style="list-style-type:none"> - * <li>{@code mailto:java-...@java.sun.com}</li> + * <li>{@code mailto:java-...@www.example.com}</li> * <li>{@code news:comp.lang.java}</li> * <li>{@code urn:isbn:096139210x}</li> * </ul></blockquote> @@ -399,7 +399,7 @@* For any URI <i>u</i> that does not contain redundant syntax such as two * slashes before an empty authority (as in {@code file:///tmp/} ) or a* colon following a host name but no port (as in- * {@code http://java.sun.com:} ), and that does not encode characters + * {@code http://www.example.com:} ), and that does not encode characters* except those that must be quoted, the following identities also hold: * <pre> * new URI(<i>u</i>.getScheme(),--- old/src/java.base/share/classes/java/net/URL.java 2018-11-26 13:32:48.658000000 -0800 +++ new/src/java.base/share/classes/java/net/URL.java 2018-11-26 13:32:48.490000000 -0800@@ -95,7 +95,7 @@ * as a "ref" or a "reference". The fragment is indicated by the sharp * sign character "#" followed by more characters. For example, * <blockquote><pre> - * http://java.sun.com/index.html#chapter1 + * http://www.example.com/index.html#chapter1 * </pre></blockquote> * <p> * This fragment is not technically part of the URL. Rather, it @@ -109,7 +109,7 @@ * relative to another URL. Relative URLs are frequently used within * HTML pages. For example, if the contents of the URL: * <blockquote><pre> - * http://java.sun.com/index.html + * http://www.example.com/index.html * </pre></blockquote> * contained within it the relative URL: * <blockquote><pre> @@ -117,7 +117,7 @@ * </pre></blockquote> * it would be a shorthand for: * <blockquote><pre> - * http://java.sun.com/FAQ.html + * http://www.example.com/FAQ.html * </pre></blockquote> * <p> * The relative URL need not specify all the components of a URL. If--- old/src/java.base/share/classes/java/net/URLPermission.java 2018-11-26 13:32:49.050000000 -0800 +++ new/src/java.base/share/classes/java/net/URLPermission.java 2018-11-26 13:32:48.874000000 -0800@@ -57,7 +57,7 @@* RFC 2732</a>. Literal IPv6 addresses must however, be enclosed in '[]' characters.* The <i>dnsname</i> specification can be preceded by "*." which means* the name will match any hostname whose right-most domain labels are the same as- * this name. For example, "*.oracle.com" matches "foo.bar.oracle.com" + * this name. For example, "*.example.com" matches "foo.bar.example.com" * <p>* <i>portrange</i> is used to specify a port number, or a bounded or unbounded range of ports * that this permission applies to. If portrange is absent or invalid, then a default@@ -78,18 +78,18 @@* <tr><th scope="col">Example url</th><th scope="col">Description</th></tr>* </thead> * <tbody style="text-align:left">- * <tr><th scope="row" style="white-space:nowrap;">http://www.oracle.com/a/b/c.html</th> + * <tr><th scope="row" style="white-space:nowrap;">http://www.example.com/a/b/c.html</th>* <td>A url which identifies a specific (single) resource</td> * </tr> - * <tr><th scope="row">http://www.oracle.com/a/b/*</th> + * <tr><th scope="row">http://www.example.com/a/b/*</th>* <td>The '*' character refers to all resources in the same "directory" - in * other words all resources with the same number of path components, and * which only differ in the final path component, represented by the '*'.* </td> * </tr> - * <tr><th scope="row">http://www.oracle.com/a/b/-</th> + * <tr><th scope="row">http://www.example.com/a/b/-</th> * <td>The '-' character refers to all resources recursively below the- * preceding path (e.g. http://www.oracle.com/a/b/c/d/e.html matches this + * preceding path (e.g. http://www.example.com/a/b/c/d/e.html matches this* example). * </td> * </tr> @@ -267,9 +267,9 @@* <li>if this's url scheme is not equal to p's url scheme return false</li> * <li>if the scheme specific part of this's url is '*' return true</li> * <li>if the set of hosts defined by p's url hostrange is not a subset of - * this's url hostrange then return false. For example, "*.foo.oracle.com"- * is a subset of "*.oracle.com". "foo.bar.oracle.com" is not - * a subset of "*.foo.oracle.com"</li>+ * this's url hostrange then return false. For example, "*.foo.example.com"+ * is a subset of "*.example.com". "foo.bar.example.com" is not + * a subset of "*.foo.example.com"</li> * <li>if the portrange defined by p's url is not a subset of the * portrange defined by this's url then return false. * <li>if the path or paths specified by p's url are contained in the--- old/src/java.base/share/classes/java/net/package-info.java 2018-11-26 13:32:49.438000000 -0800 +++ new/src/java.base/share/classes/java/net/package-info.java 2018-11-26 13:32:49.262000000 -0800@@ -131,7 +131,7 @@ * InputStream. * <p>Here is an example:</p> * <pre> - * URI uri = new URI("http://java.sun.com/"); + * URI uri = new URI("http://www.example.com/"); * URL url = uri.toURL(); * InputStream in = url.openStream(); * </pre>--- old/src/java.base/share/classes/java/nio/file/Files.java 2018-11-26 13:32:49.798000000 -0800 +++ new/src/java.base/share/classes/java/nio/file/Files.java 2018-11-26 13:32:49.630000000 -0800@@ -3067,7 +3067,7 @@ * it to a file: * <pre> * Path path = ... - * URI u = URI.create("http://java.sun.com/"); + * URI u = URI.create("http://www.example.com/"); * try (InputStream in = u.toURL().openStream()) { * Files.copy(in, path); * }--- old/src/java.base/share/classes/java/security/CodeSource.java 2018-11-26 13:32:50.206000000 -0800 +++ new/src/java.base/share/classes/java/security/CodeSource.java 2018-11-26 13:32:50.042000000 -0800@@ -309,13 +309,13 @@ * <p> * For example, the codesource objects with the following locations * and null certificates all imply- * the codesource with the location "http://java.sun.com/classes/foo.jar" + * the codesource with the location "http://www.example.com/classes/foo.jar"* and null certificates: * <pre> * http: - * http://*.sun.com/classes/* - * http://java.sun.com/classes/- - * http://java.sun.com/classes/foo.jar + * http://*.example.com/classes/* + * http://www.example.com/classes/- + * http://www.example.com/classes/foo.jar * </pre> * * Note that if this CodeSource has a null location and a null