<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Artem,<br>
thanks for the feedback, I'll make the changes for 2 & 3.<br>
I'll look into rework of try-with-resources.<br>
<br>
regards<br>
Mark<br>
<br>
<div class="moz-cite-prefix">On 26/10/2015 00:24, Artem Smotrakov
wrote:<br>
</div>
<blockquote cite="mid:562D72A7.1040302@oracle.com" type="cite">
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<div class="moz-cite-prefix">Hi Mark,<br>
<br>
I am not a reviewer, just have a couple of comments about
InetAddress.java<br>
<br>
1. It may be better to create an instance of Scanner in
try-with-resource block to be sure that Scanner.close() method
is called.<br>
<br>
2. Lines 909-923: <br>
<br>
There are two similar "if" blocks in the loop. Looks like the
first one is not necessary (I also see similar code in
lookupAllHostAddr() method, maybe this code could be moved to a
separate method).<br>
<br>
3. extractHostAddr() and extractHost() methods:<br>
<br>
The methods assume that "hostEntry" contains at least one
whitespace, and access first and second elements of "mapping
<meta http-equiv="content-type" content="text/html;
charset=utf-8">
" array. It may be better to check that length of "mapping" is
more than one to avoid a possible
ArrayIndexOutOfBoundsException.<br>
<br>
Looks like those methods may also be static.<br>
<br>
Artem<br>
<br>
On 10/26/2015 02:32 AM, Mark Sheppard wrote:<br>
</div>
<blockquote cite="mid:562D6679.9090509@oracle.com" type="cite">
<meta http-equiv="content-type" content="text/html;
charset=utf-8">
Hi,<br>
please oblige and review the following changes<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://cr.openjdk.java.net/%7Emsheppar/8134577/webrev/">http://cr.openjdk.java.net/~msheppar/8134577/webrev/</a><br>
<br>
which address the issue raised in<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://bugs.openjdk.java.net/browse/JDK-8134577">https://bugs.openjdk.java.net/browse/JDK-8134577</a><br>
<br>
the operative word has been "eliminate".<br>
As such, the interface and service descriptor
sun.net.spi.nameservice.NameService <br>
sun.net.spi.nameservice.NameServiceDescriptor<font color="red"><b><br>
</b></font>together with its implementation
(sun.net.nameservice.dns.DNSNameService)<br>
has been remove from the JDK libraries.<br>
<br>
The immediate impact is seen in the JDK testing framework.<br>
<br>
To facilitate testing activity, and provide a replacement for
the customized NameService implementations in the<br>
JDK tests, the default NameService has been extended to support
<br>
the retrieval of host to IP address mappings from a file. <br>
The file path is specified with a system property "
jdk.internal.hosts".<br>
<br>
Previously a nameservice provider was specified by setting the
system property<br>
"sun.net.spi.nameservice.provider.", as per the documentation<br>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://docs.oracle.com/javase/8/docs/technotes/guides/net/properties.html">http://docs.oracle.com/javase/8/docs/technotes/guides/net/properties.html</a><br>
<br>
InetAddress now tests to determine if this property is set and
will throw a ServiceConfigurationError<br>
indicating that this functionality is no longer supported. The
choice of ServideConfigurationError may cause<br>
some debate, or disagreement. The rationale was that
InternalError, is documented to relate to a JVM error,<br>
and javax.naming.NamingException has a context of DirContext. <br>
A possible alternative candidate could be
javax.naming.ServiceUnavailableException.<br>
As such, the setting of the property
"sun.net.spi.nameservice.provider." was used, previously, as a
configuration<br>
parameter for the loading of a NamerService service provider,
and as this is now (considered) an error,
ServiceConfigurationError, <br>
seemed a best fit!<br>
<br>
These changes impacted a number of jdk security tests, also. The
affected tetsts have been amended to adopt the<br>
changes, with the exception of
test/sun/security/x509/URICertStore/ExtensionsWithLDAP.java <br>
which will require some rewrite.<br>
<br>
regards<br>
Mark<br>
<br>
</blockquote>
<br>
</blockquote>
<br>
</body>
</html>