RFR: JDK-8134577 - Eliminate or standardize a replacement for sun.net.spi.nameservice.NameServiceDescriptor
Mark Sheppard
mark.sheppard at oracle.com
Thu Jan 7 10:44:05 UTC 2016
again thanks for the review and feedback, Alan
patch amended as suggested
http://cr.openjdk.java.net/~msheppar/8134577/webrev.08/
removed File.exists test in createNameService - lookup methods in
HostsFileNameService already throw UHE for FileNotFoundException
InetAddress.impl marked final
removed references to JNDI
added test for non-existent hosts file
regards
Mark
On 06/01/2016 20:37, Alan Bateman wrote:
> On 06/01/2016 15:37, Mark Sheppard wrote:
>> thanks for the feedback, Alan
>>
>> based on suggestions, all issues have been addressed and patch has
>> been updated
>>
>> http://cr.openjdk.java.net/~msheppar/8134577/webrev.07
>>
>> the following should be noted:
>>
>> ExtensionsWithLDAP.java is added to the exclude list with JDK-8134577
>> - This is on the problem list as it will need to be re-written
>> The NameService associated with this test threw UnknownHostExceptions
>> and added the host name to a List, which was then examined
>> later in the test as a verification.
>>
>> The instantiation of a NameService is as intended, i.e.
>> if jdk.net.hosts.file set and file exist then
>> instantiate HostsFileNameService
>> else
>> instantiate PlatformNameService
>>
>> this is in keeping with previous initialization semantics - if the no
>> service provider NameService
>> created then the default NameService was instantiated.
> I think this looks quite good.
>
> If jdk.net.hosts.file is set to a file that doesn't exist then I think
> it should throw an exception or else just work as if the hosts file is
> empty. However, it's probably not worth spending time on as this
> mechanism is mostly for tests.
>
> There is still a reference to the JNDI-DNS provider in
> HostsFileNameService and I assume that should be removed as it's
> essentially a historical reference now.
>
> I assume InetAddress.impl can be changed to be final.
>
> For ExtensionsWithLDAP.java then you need to create an issue to track
> it and use that issue number when adding it to the exclude list.
>
> I think that is all I have on this topic.
>
> -Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/net-dev/attachments/20160107/9542ee9c/attachment.html>
More information about the net-dev
mailing list