RFR: JDK-8134577 - Eliminate or standardize a replacement for sun.net.spi.nameservice.NameServiceDescriptor

Mark Sheppard mark.sheppard at oracle.com
Thu Nov 12 16:46:35 UTC 2015


Hi,
     based on feedback from first review the updates have been amended
please oblige and review the current set of changes as per

http://cr.openjdk.java.net/~msheppar/8134577/webrev.02/

regards
Mark

On 25/10/2015 23:32, Mark Sheppard wrote:
> Hi,
>    please oblige and review the following changes
> http://cr.openjdk.java.net/~msheppar/8134577/webrev/
>
> which address the issue raised in
> https://bugs.openjdk.java.net/browse/JDK-8134577
>
> the operative word has been "eliminate".
> As such, the interface and service descriptor 
> sun.net.spi.nameservice.NameService
> sun.net.spi.nameservice.NameServiceDescriptor*
> *together with its implementation (sun.net.nameservice.dns.DNSNameService)
> has been remove from the JDK libraries.
>
> The immediate impact is seen in the JDK testing framework.
>
> To facilitate testing activity, and provide a replacement for the 
> customized NameService implementations in the
> JDK tests,  the default NameService has been extended to support
> the retrieval of host to IP address mappings from a file.
> The file path is specified with a system property " jdk.internal.hosts".
>
> Previously a nameservice provider was specified by setting the system 
> property
> "sun.net.spi.nameservice.provider.", as per the documentation
> http://docs.oracle.com/javase/8/docs/technotes/guides/net/properties.html
>
> InetAddress now tests to determine if this property is set and will 
> throw a ServiceConfigurationError
> indicating that this functionality is no longer supported. The choice 
> of ServideConfigurationError may cause
> some debate, or disagreement. The rationale was that InternalError,  
> is documented to relate to a JVM error,
> and javax.naming.NamingException has a context of DirContext.
> A possible alternative candidate could be 
> javax.naming.ServiceUnavailableException.
> As such, the setting of the property 
> "sun.net.spi.nameservice.provider." was used, previously, as a 
> configuration
> parameter for the loading of a NamerService service provider, and as 
> this is now (considered) an error, ServiceConfigurationError,
> seemed a best fit!
>
> These changes impacted a number of jdk security tests, also. The 
> affected tetsts have been amended to adopt the
> changes, with the exception of 
> test/sun/security/x509/URICertStore/ExtensionsWithLDAP.java
> which will require some rewrite.
>
> regards
> Mark
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/security-dev/attachments/20151112/cb89c600/attachment.htm>


More information about the security-dev mailing list