RFR: JDK-8134577 - Eliminate or standardize a replacement for sun.net.spi.nameservice.NameServiceDescriptor
Mark Sheppard
mark.sheppard at oracle.com
Fri Nov 13 12:44:49 UTC 2015
Hi,
to summarize the amendments below:
ServiceConfigurationError removed - the code no longer reads the
nameservice provider property, it silently ignored
try-with-resources statement added in getHostByAddr and
lookupAllHostAddr methods of NameService, and duplicate statements removed
hosts file name in tests changed to TestHosts to avoid any potential
confusion with /etc/hosts
regards
Mark
On 12/11/2015 16:46, Mark Sheppard wrote:
> 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/20151113/4bfc2aeb/attachment.htm>
More information about the security-dev
mailing list