RFR: 8244202: Implementation of JEP 418: Internet-Address Resolution SPI [v6]

Daniel Fuchs dfuchs at openjdk.java.net
Thu Oct 21 19:12:09 UTC 2021

On Thu, 21 Oct 2021 18:21:50 GMT, Aleksei Efimov <aefimov at openjdk.org> wrote:

>> This change implements a new service provider interface for host name and address resolution, so that java.net.InetAddress API can make use of resolvers other than the platform's built-in resolver.
>> The following API classes are added to `java.net.spi` package to facilitate this:
>> - `InetAddressResolverProvider` -  abstract class defining a service, and is, essentially, a factory for `InetAddressResolver` resolvers.
>> - `InetAddressResolverProvider.Configuration ` - an interface describing the platform's built-in configuration for resolution operations that could be used to bootstrap a resolver construction, or to implement partial delegation of lookup operations.
>> - `InetAddressResolver` - an interface that defines methods for the fundamental forward and reverse lookup operations.
>> - `InetAddressResolver.LookupPolicy` - a class whose instances describe the characteristics of one forward lookup operation.  
>> More details in [JEP-418](https://openjdk.java.net/jeps/418).
>> Testing: new and existing `tier1:tier3` tests
> Aleksei Efimov has updated the pull request incrementally with one additional commit since the last revision:
>   Review updates + move resolver docs to the provider class (CSR update to follow)

src/java.base/share/classes/java/net/InetAddress.java line 152:

> 150:  *
> 151:  * <h3> Host Name Resolution </h3>
> 152:  * Host name-to-IP address <i>resolution</i> is accomplished through the use

maybe you need a `<p> ` there even though it's the first paragaph under the header.

src/java.base/share/classes/java/net/InetAddress.java line 159:

> 157:  * by <a href="spi/InetAddressResolverProvider.html#system-wide-resolver">
> 158:  * deploying</a> an {@link InetAddressResolverProvider}.
> 159:  * <p id="built-in-resolver">The built-in resolver implementation is used by

did you double check that anchors defined with `<p id="xxx">` actually work in the generated API doc?
Also maybe leave a blank line before any opening `<p`, that makes it easier to see where the paragraphs are. 
And the convention is to leave a white space after the `<p>` tag...

src/java.base/share/classes/java/net/spi/InetAddressResolver.java line 36:

> 34:  * This interface defines operations for looking-up host names and IP addresses.
> 35:  * An instance of {@code InetAddressResolver} is
> 36:  * <a href="InetAddressResolverProvider.html#system-wide-resolver">installed</a> as a

Maybe it would be more appropriate to link _system-wide-resolver_ instead (on the next line in the same sentence).

src/java.base/share/classes/java/net/spi/InetAddressResolverProvider.java line 37:

> 35:  *
> 36:  * <p>A resolver provider is a factory for custom implementations of {@linkplain
> 37:  * InetAddressResolver resolvers}. A resolver define operations for looking up

... a resolver define**s** ...


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

More information about the security-dev mailing list