On Sat, 23 Oct 2021 06:19:46 GMT, Alan Bateman <al...@openjdk.org> wrote:

>> Aleksei Efimov has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   More javadoc updates to API classes
>
> src/java.base/share/classes/java/net/InetAddress.java line 169:
> 
>> 167:  * Access Protocol (LDAP).
>> 168:  * The particular naming services that the built-in resolver uses by 
>> default
>> 169:  * depend on the configuration of the local machine.
> 
> depend -> depends

Thanks, changed in 1378686becfcbf18793556de8381b5ebcd79698d

> src/java.base/share/classes/java/net/spi/InetAddressResolver.java line 38:
> 
>> 36:  * deployed as a <a 
>> href="InetAddressResolverProvider.html#system-wide-resolver">
>> 37:  * system-wide resolver</a>. {@link InetAddress} delegates all lookup 
>> requests to
>> 38:  * the deployed <i>system-wide resolver</i> instance.
> 
> I think the class description would be a bit clearer if we drop sentence 2 
> because it overlaps with paragraph 2. I think we can adjust sentence 3 to 
> "InetAddress delegates all lookup operations to the system-wide resolver" and 
> it will all flow nicely.

Thanks, changed as suggested in 1378686becfcbf18793556de8381b5ebcd79698d

> src/java.base/share/classes/java/net/spi/InetAddressResolver.java line 88:
> 
>> 86:      *                                  to a valid IP address length
>> 87:      */
>> 88:     String lookupByAddress(byte[] addr) throws UnknownHostException;
> 
> I assume this throws NPE if addr is null.

1378686becfcbf18793556de8381b5ebcd79698d: added @ throws NPE javadoc, also 
added additional checks for `null` parameter values into the built-in and hosts 
file resolver implementations.

> src/java.base/share/classes/java/net/spi/InetAddressResolverProvider.java 
> line 45:
> 
>> 43:  * system-wide resolver instance, which is used by
>> 44:  * <a 
>> href="{@docRoot}/java.base/java/net/InetAddress.html#host-name-resolution">
>> 45:  * InetAddress</a>.
> 
> I think we should prune some some of the text from the class description to 
> avoid repetition.  Here's a suggestion:
> 
> 1. Add the following immediately after the sentence "A given innovation ..."
> "It is set after the VM is fully initialized and when an invocation of a 
> method in InetAddress class triggers the first lookup operation. 
> 
> 2. Replace the text in L47-65 with:
> "A resolver provider is located and loaded by InetAddress to create the 
> systwm-wide resolver as follows:
> 
> 3. Replace the remaining three usages of "install" with "set".

Thanks, changed as suggested: 1378686becfcbf18793556de8381b5ebcd79698d

-------------

PR: https://git.openjdk.java.net/jdk/pull/5822

Reply via email to