Re: improving java.net.UnknownHostException

2021-10-29 Thread Florian Weimer
* Daniel Fuchs: > The platform built-in resolver that performs name-to-address > resolution delegates to `getaddrinfo`. AFAICS `getaddrinfo` doesn't > seem to provide this level of granularity in the error codes > that it might return - though maybe distinguishing between > some of the errors it r

Re: improving java.net.UnknownHostException

2021-10-29 Thread Alan Bateman
On 29/10/2021 14:44, Richard Gibson wrote: The OCI DNS team are fielding an increasing amount of usage by customers relying upon Java, and the lack of detail associated with java.net.UnknownHostException for differentiating e.g. timeout vs. NXDOMAIN vs. NODATA vs. SERVFAIL vs. REFUSED has cost

Re: [External] : Re: improving java.net.UnknownHostException

2021-10-29 Thread Richard Gibson
Oh, I'm not familiar with that so I don't know. From: Florian Weimer Sent: Friday, October 29, 2021 11:41 To: Richard Gibson Cc: net-dev@openjdk.java.net Subject: Re: [External] : Re: improving java.net.UnknownHostException * Richard Gibson: > Probably the Open

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

2021-10-29 Thread Daniel Fuchs
On Fri, 29 Oct 2021 16:17:46 GMT, Aleksei Efimov 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

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

2021-10-29 Thread Aleksei Efimov
On Wed, 27 Oct 2021 16:23:29 GMT, Michael McMahon wrote: >> Aleksei Efimov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Add @ throws NPE to hosts file resolver javadoc > > src/java.base/share/classes/java/net/InetAddress.java line 841

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

2021-10-29 Thread Aleksei Efimov
> 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: > -

Re: [External] : Re: improving java.net.UnknownHostException

2021-10-29 Thread Florian Weimer
* Richard Gibson: > Probably the OpenJDK implementation, which currently appears to return > even less information than the famously-restrained getaddrinfo. But > I'd love to see use of something better such as getdns if that is not > already the case. Oh, I was asking about the other OpenJDK nam

Re: [External] : Re: improving java.net.UnknownHostException

2021-10-29 Thread Richard Gibson
Probably the OpenJDK implementation, which currently appears to return even less information than the famously-restrained getaddrinfo. But I'd love to see use of something better such as getdns if that is not already the case. From: Florian Weimer Sent: Friday,

Re: improving java.net.UnknownHostException

2021-10-29 Thread Daniel Fuchs
Hi Richard, Information about hosts that are embedded in exceptions are often limited and constrained for security reason. That said, possibly some more details could be included in some circumstances, for instance, if allowed by the jdk.includeInExceptions property. The platform built-in resolv

Re: improving java.net.UnknownHostException

2021-10-29 Thread Florian Weimer
* Richard Gibson: > The OCI DNS team are fielding an increasing amount of usage by > customers relying upon Java, and the lack of detail associated with > java.net.UnknownHostException for differentiating e.g. timeout > vs. NXDOMAIN vs. NODATA vs. SERVFAIL vs. REFUSED has cost a great deal > of ti

improving java.net.UnknownHostException

2021-10-29 Thread Richard Gibson
The OCI DNS team are fielding an increasing amount of usage by customers relying upon Java, and the lack of detail associated with java.net.UnknownHostException for differentiating e.g. timeout vs. NXDOMAIN vs. NODATA vs. SERVFAIL vs. REFUSED has cost a great deal of time in investigating issue

Re: RFR: 8274835: Remove unnecessary castings in java.base

2021-10-29 Thread Tagir Valeev
On Thu, Oct 7, 2021 at 12:15 AM Joe Darcy wrote: > Curious. The JDK build is done with javac -Xlint:cast warning enabled > (JDK-8032734) which is intended to catch issues like this. Perhaps IntelliJ > is using a different (or sharper) analysis. Yes, our analysis is written independently of Jav

Re: RFR: 8275534: com.sun.net.httpserver.BasicAuthenticator should check whether "realm" is a quoted string

2021-10-29 Thread Julia Boes
On Tue, 26 Oct 2021 13:56:25 GMT, Daniel Fuchs wrote: >> This change ensures that the realm string passed to the BasicAuthenticator >> constructor is a quoted-string, as per RFC7230 [1]. A Utils class is added >> to jdk.httpserver/sun.net.httpserver that holds the new isQuotedString() >> metho

Re: RFR: 8275534: com.sun.net.httpserver.BasicAuthenticator should check whether "realm" is a quoted string

2021-10-29 Thread Michael McMahon
On Fri, 29 Oct 2021 10:28:39 GMT, Michael McMahon wrote: >> OK - but then I'd still say: `The value of the {@code realm} parameter will >> be embedded in a quoted string.` >> Otherwise the caller might think they need to provide a quoted string such >> as: "\\"realm\\"" which would end up as re

RFR: 8276166: Remove dead code from MimeTable and MimeEntry

2021-10-29 Thread Сергей Цыпанов
There are unused methods/constructors in mentioned classes that can be safely removed. - Commit messages: - 8276166: Remove dead code from MimeTable and MimeEntry Changes: https://git.openjdk.java.net/jdk/pull/6169/files Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=6169&r

Re: RFR: 8275534: com.sun.net.httpserver.BasicAuthenticator should check whether "realm" is a quoted string

2021-10-29 Thread Michael McMahon
On Fri, 29 Oct 2021 10:12:25 GMT, Daniel Fuchs wrote: >> I still think it is too much of a corner case to impose on the API doc so >> much. How about changing the @throws to >> >> >> * @throws IllegalArgumentException if realm is an empty string or is >> not correctly >> *

Re: RFR: 8275534: com.sun.net.httpserver.BasicAuthenticator should check whether "realm" is a quoted string

2021-10-29 Thread Daniel Fuchs
On Fri, 29 Oct 2021 10:07:45 GMT, Michael McMahon wrote: >> src/jdk.httpserver/share/classes/com/sun/net/httpserver/BasicAuthenticator.java >> line 77: >> >>> 75: * Where a backslash ("\") is used as quoting mechanism within >>> the realm >>> 76: * string, it must be escaped by two p

Re: RFR: 8275534: com.sun.net.httpserver.BasicAuthenticator should check whether "realm" is a quoted string

2021-10-29 Thread Michael McMahon
On Tue, 26 Oct 2021 13:31:35 GMT, Daniel Fuchs wrote: >> This change ensures that the realm string passed to the BasicAuthenticator >> constructor is a quoted-string, as per RFC7230 [1]. A Utils class is added >> to jdk.httpserver/sun.net.httpserver that holds the new isQuotedString() >> metho

Re: RFR: 8275534: com.sun.net.httpserver.BasicAuthenticator should check whether "realm" is a quoted string

2021-10-29 Thread Daniel Fuchs
On Tue, 26 Oct 2021 12:46:31 GMT, Julia Boes wrote: > This change ensures that the realm string passed to the BasicAuthenticator > constructor is a quoted-string, as per RFC7230 [1]. A Utils class is added to > jdk.httpserver/sun.net.httpserver that holds the new isQuotedString() method > and