diff -r d292e6a0481f -r a3fd5c769680 jdk/src/share/classes/java/net/InetAddress.java --- a/jdk/src/share/classes/java/net/InetAddress.java Thu Aug 08 19:16:27 2013 +0200 +++ b/jdk/src/share/classes/java/net/InetAddress.java Fri Aug 09 14:43:19 2013 +0100 @@ -303,7 +303,7 @@ /** * Utility routine to check if the InetAddress is an * IP multicast address. - * @return a boolean indicating if the InetAddress is + * @return a {@code boolean} indicating if the InetAddress is * an IP multicast address * @since JDK1.1 */ @@ -313,7 +313,7 @@ /** * Utility routine to check if the InetAddress in a wildcard address. - * @return a boolean indicating if the Inetaddress is + * @return a {@code boolean} indicating if the Inetaddress is * a wildcard address. * @since 1.4 */ @@ -324,7 +324,7 @@ /** * Utility routine to check if the InetAddress is a loopback address. * - * @return a boolean indicating if the InetAddress is + * @return a {@code boolean} indicating if the InetAddress is * a loopback address; or false otherwise. * @since 1.4 */ @@ -335,7 +335,7 @@ /** * Utility routine to check if the InetAddress is an link local address. * - * @return a boolean indicating if the InetAddress is + * @return a {@code boolean} indicating if the InetAddress is * a link local address; or false if address is not a link local unicast address. * @since 1.4 */ @@ -346,7 +346,7 @@ /** * Utility routine to check if the InetAddress is a site local address. * - * @return a boolean indicating if the InetAddress is + * @return a {@code boolean} indicating if the InetAddress is * a site local address; or false if address is not a site local unicast address. * @since 1.4 */ @@ -357,7 +357,7 @@ /** * Utility routine to check if the multicast address has global scope. * - * @return a boolean indicating if the address has + * @return a {@code boolean} indicating if the address has * is a multicast address of global scope, false if it is not * of global scope or it is not a multicast address * @since 1.4 @@ -369,7 +369,7 @@ /** * Utility routine to check if the multicast address has node scope. * - * @return a boolean indicating if the address has + * @return a {@code boolean} indicating if the address has * is a multicast address of node-local scope, false if it is not * of node-local scope or it is not a multicast address * @since 1.4 @@ -381,7 +381,7 @@ /** * Utility routine to check if the multicast address has link scope. * - * @return a boolean indicating if the address has + * @return a {@code boolean} indicating if the address has * is a multicast address of link-local scope, false if it is not * of link-local scope or it is not a multicast address * @since 1.4 @@ -393,7 +393,7 @@ /** * Utility routine to check if the multicast address has site scope. * - * @return a boolean indicating if the address has + * @return a {@code boolean} indicating if the address has * is a multicast address of site-local scope, false if it is not * of site-local scope or it is not a multicast address * @since 1.4 @@ -405,7 +405,7 @@ /** * Utility routine to check if the multicast address has organization scope. * - * @return a boolean indicating if the address has + * @return a {@code boolean} indicating if the address has * is a multicast address of organization-local scope, * false if it is not of organization-local scope * or it is not a multicast address @@ -431,9 +431,9 @@ * in an IllegalArgumentException being thrown. * * @param timeout the time, in milliseconds, before the call aborts - * @return a boolean indicating if the address is reachable. + * @return a {@code boolean} indicating if the address is reachable. * @throws IOException if a network error occurs - * @throws IllegalArgumentException if timeout is negative. + * @throws IllegalArgumentException if {@code timeout} is negative. * @since 1.5 */ public boolean isReachable(int timeout) throws IOException { @@ -449,10 +449,10 @@ * privilege can be obtained, otherwise it will try to establish * a TCP connection on port 7 (Echo) of the destination host. *

- * The network interface and ttl parameters + * The {@code network interface} and {@code ttl} parameters * let the caller specify which network interface the test will go through * and the maximum number of hops the packets should go through. - * A negative value for the ttl will result in an + * A negative value for the {@code ttl} will result in an * IllegalArgumentException being thrown. *

* The timeout value, in milliseconds, indicates the maximum amount of time @@ -465,9 +465,9 @@ * @param ttl the maximum numbers of hops to try or 0 for the * default * @param timeout the time, in milliseconds, before the call aborts - * @throws IllegalArgumentException if either timeout - * or ttl are negative. - * @return a booleanindicating if the address is reachable. + * @throws IllegalArgumentException if either {@code timeout} + * or {@code ttl} are negative. + * @return a {@code boolean}indicating if the address is reachable. * @throws IOException if a network error occurs * @since 1.5 */ @@ -493,8 +493,8 @@ * {@link #getCanonicalHostName() getCanonicalHostName}. * *

If there is a security manager, its - * checkConnect method is first called - * with the hostname and -1 + * {@code checkConnect} method is first called + * with the hostname and {@code -1} * as its arguments to see if the operation is allowed. * If the operation is not allowed, it will return * the textual representation of the IP address. @@ -518,8 +518,8 @@ * here without a security check. * *

If there is a security manager, this method first - * calls its checkConnect method - * with the hostname and -1 + * calls its {@code checkConnect} method + * with the hostname and {@code -1} * as its arguments to see if the calling code is allowed to know * the hostname for this IP address, i.e., to connect to the host. * If the operation is not allowed, it will return @@ -546,8 +546,8 @@ * the FQDN depending on the underlying system configuration. * *

If there is a security manager, this method first - * calls its checkConnect method - * with the hostname and -1 + * calls its {@code checkConnect} method + * with the hostname and {@code -1} * as its arguments to see if the calling code is allowed to know * the hostname for this IP address, i.e., to connect to the host. * If the operation is not allowed, it will return @@ -573,8 +573,8 @@ * Returns the hostname for this address. * *

If there is a security manager, this method first - * calls its checkConnect method - * with the hostname and -1 + * calls its {@code checkConnect} method + * with the hostname and {@code -1} * as its arguments to see if the calling code is allowed to know * the hostname for this IP address, i.e., to connect to the host. * If the operation is not allowed, it will return @@ -640,9 +640,9 @@ } /** - * Returns the raw IP address of this InetAddress + * Returns the raw IP address of this {@code InetAddress} * object. The result is in network byte order: the highest order - * byte of the address is in getAddress()[0]. + * byte of the address is in {@code getAddress()[0]}. * * @return the raw IP address of this object. */ @@ -671,18 +671,18 @@ /** * Compares this object against the specified object. - * The result is true if and only if the argument is - * not null and it represents the same IP address as + * The result is {@code true} if and only if the argument is + * not {@code null} and it represents the same IP address as * this object. *

- * Two instances of InetAddress represent the same IP + * Two instances of {@code InetAddress} represent the same IP * address if the length of the byte arrays returned by - * getAddress is the same for both, and each of the + * {@code getAddress} is the same for both, and each of the * array components is the same for the byte arrays. * * @param obj the object to compare against. - * @return true if the objects are the same; - * false otherwise. + * @return {@code true} if the objects are the same; + * {@code false} otherwise. * @see java.net.InetAddress#getAddress() */ public boolean equals(Object obj) { @@ -690,7 +690,7 @@ } /** - * Converts this IP address to a String. The + * Converts this IP address to a {@code String}. The * string returned is of the form: hostname / literal IP * address. * @@ -981,7 +981,7 @@ * No name service is checked for the validity of the address. * *

The host name can either be a machine name, such as - * "java.sun.com", or a textual representation of its IP + * "{@code java.sun.com}", or a textual representation of its IP * address. *

No validity checking is done on the host name either. * @@ -1026,26 +1026,26 @@ * Determines the IP address of a host, given the host's name. * *

The host name can either be a machine name, such as - * "java.sun.com", or a textual representation of its + * "{@code java.sun.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. * - *

For host specified in literal IPv6 address, + *

For {@code host} specified in literal IPv6 address, * either the form defined in RFC 2732 or the literal IPv6 address * format defined in RFC 2373 is accepted. IPv6 scoped addresses are also * supported. See here for a description of IPv6 * scoped addresses. * - *

If the host is null then an InetAddress + *

If the host is {@code null} then an {@code InetAddress} * representing an address of the loopback interface is returned. * See RFC 3330 * section 2 and RFC 2373 * section 2.5.3.

* - * @param host the specified host, or null. + * @param host the specified host, or {@code null}. * @return an IP address for the given host name. * @exception UnknownHostException if no IP address for the - * host could be found, or if a scope_id was specified + * {@code host} could be found, or if a scope_id was specified * for a global IPv6 address. * @exception SecurityException if a security manager exists * and its checkConnect method doesn't allow the operation @@ -1066,37 +1066,37 @@ * based on the configured name service on the system. * *

The host name can either be a machine name, such as - * "java.sun.com", or a textual representation of its IP + * "{@code java.sun.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. * - *

For host specified in literal IPv6 address, + *

For {@code host} specified in literal IPv6 address, * either the form defined in RFC 2732 or the literal IPv6 address * format defined in RFC 2373 is accepted. A literal IPv6 address may * also be qualified by appending a scoped zone identifier or scope_id. * The syntax and usage of scope_ids is described * here. - *

If the host is null then an InetAddress + *

If the host is {@code null} then an {@code InetAddress} * representing an address of the loopback interface is returned. * See RFC 3330 * section 2 and RFC 2373 * section 2.5.3.

* - *

If there is a security manager and host is not - * null and host.length() is not equal to zero, the + *

If there is a security manager and {@code host} is not + * null and {@code host.length() } is not equal to zero, the * security manager's - * checkConnect method is called - * with the hostname and -1 + * {@code checkConnect} method is called + * with the hostname and {@code -1} * as its arguments to see if the operation is allowed. * - * @param host the name of the host, or null. + * @param host the name of the host, or {@code null}. * @return an array of all the IP addresses for a given host name. * * @exception UnknownHostException if no IP address for the - * host could be found, or if a scope_id was specified + * {@code host} could be found, or if a scope_id was specified * for a global IPv6 address. * @exception SecurityException if a security manager exists and its - * checkConnect method doesn't allow the operation. + * {@code checkConnect} method doesn't allow the operation. * * @see SecurityManager#checkConnect */ @@ -1396,9 +1396,9 @@ } /** - * Returns an InetAddress object given the raw IP address . + * Returns an {@code InetAddress} object given the raw IP address . * The argument is in network byte order: the highest order - * byte of the address is in getAddress()[0]. + * byte of the address is in {@code getAddress()[0]}. * *

This method doesn't block, i.e. no reverse name service lookup * is performed. @@ -1424,14 +1424,14 @@ /** * Returns the address of the local host. This is achieved by retrieving * the name of the host from the system, then resolving that name into - * an InetAddress. + * an {@code InetAddress}. * *

Note: The resolved address may be cached for a short period of time. *

* *

If there is a security manager, its - * checkConnect method is called - * with the local host name and -1 + * {@code checkConnect} method is called + * with the local host name and {@code -1} * as its arguments to see if the operation is allowed. * If the operation is not allowed, an InetAddress representing * the loopback address is returned.