RFR: 8259662: SocketException should be passed through

2021-01-13 Thread Clive Verghese
Redo for 8237578: JDK-8214339 (SSLSocketImpl wraps SocketException) appears to not be fully fixed This also fixes JDK-8259516: Alerts sent by peer may not be received correctly during TLS handshake - Commit messages: - 8259662: SocketException should be passed through Changes: ht

Re: RFR: 8259662: SocketException should be passed through

2021-01-13 Thread Daniel Fuchs
On Wed, 13 Jan 2021 06:19:18 GMT, Clive Verghese wrote: > Redo for 8237578: JDK-8214339 (SSLSocketImpl wraps SocketException) appears > to not be fully fixed > > This also fixes JDK-8259516: Alerts sent by peer may not be received > correctly during TLS handshake The changes to the HttpClient

RFR: 8259699: Reduce char[] copying in URLEncoder.encode(String, Charset)

2021-01-13 Thread Сергей Цыпанов
Instead of allocating a copy of underlying array via `CharArrayWriter.toCharArray()` and passing it to constructor of String String str = new String(charArrayWriter.toCharArray()); we could call `toString()` method String str = charArrayWriter.toString(); decoding existing char[] without making a

Re: RFR: 8259699: Reduce char[] copying in URLEncoder.encode(String, Charset)

2021-01-13 Thread Сергей Цыпанов
On Sun, 10 Jan 2021 20:13:51 GMT, Attila Szegedi wrote: >> Instead of allocating a copy of underlying array via >> `CharArrayWriter.toCharArray()` and passing it to constructor of String >> String str = new String(charArrayWriter.toCharArray()); >> we could call `toString()` method >> String str

Re: RFR: 8259699: Reduce char[] copying in URLEncoder.encode(String, Charset)

2021-01-13 Thread Attila Szegedi
On Mon, 11 Jan 2021 09:28:46 GMT, Сергей Цыпанов wrote: >> Looks good! > > @szegedi could you please create a ticket for this change? Otherwise I cannot > merge it Filed a ticket, you should rename this PR to "8259699: Reduce char[] copying in URLEncoder.encode(String, Charset)"

Re: RFR: 8259699: Reduce char[] copying in URLEncoder.encode(String, Charset)

2021-01-13 Thread Attila Szegedi
On Thu, 3 Dec 2020 14:29:58 GMT, Сергей Цыпанов wrote: > Instead of allocating a copy of underlying array via > `CharArrayWriter.toCharArray()` and passing it to constructor of String > String str = new String(charArrayWriter.toCharArray()); > we could call `toString()` method > String str = ch

Re: RFR: 8259699: Reduce char[] copying in URLEncoder.encode(String, Charset)

2021-01-13 Thread Claes Redestad
On Thu, 3 Dec 2020 14:29:58 GMT, Сергей Цыпанов wrote: > Instead of allocating a copy of underlying array via > `CharArrayWriter.toCharArray()` and passing it to constructor of String > String str = new String(charArrayWriter.toCharArray()); > we could call `toString()` method > String str = ch

Re: RFR: 8259699: Reduce char[] copying in URLEncoder.encode(String, Charset)

2021-01-13 Thread Сергей Цыпанов
On Wed, 13 Jan 2021 13:48:40 GMT, Claes Redestad wrote: >> Instead of allocating a copy of underlying array via >> `CharArrayWriter.toCharArray()` and passing it to constructor of String >> String str = new String(charArrayWriter.toCharArray()); >> we could call `toString()` method >> String str

Re: RFR: 8259631: Reapply pattern match instanceof use in HttpClientImpl

2021-01-13 Thread Chris Hegarty
On Tue, 12 Jan 2021 16:05:01 GMT, Aleksei Efimov wrote: > Hi, > > The proposed change adds back [1] `instanceof` pattern match use to > `HttpClientImpl` class. It was previously removed by > [JDK-8258696](https://bugs.openjdk.java.net/browse/JDK-8258696) due to docs > build failure. > > Alek

Integrated: JDK-8212035 : merge jdk.test.lib.util.SimpleHttpServer with jaxp.library.SimpleHttpServer

2021-01-13 Thread Mahendra Chhipa
On Fri, 4 Dec 2020 19:44:33 GMT, Mahendra Chhipa wrote: > jaxp.library.SimpleHttpServer > https://bugs.openjdk.java.net/browse/JDK-8212035 This pull request has now been integrated. Changeset: 5df2a949 Author:Mahendra Chhipa Committer: Daniel Fuchs URL: https://git.openjdk.java.net

Re: RFR: 8259662: SocketException should be passed through

2021-01-13 Thread Rajan Halade
On Wed, 13 Jan 2021 06:19:18 GMT, Clive Verghese wrote: > Redo for 8237578: JDK-8214339 (SSLSocketImpl wraps SocketException) appears > to not be fully fixed > > This also fixes JDK-8259516: Alerts sent by peer may not be received > correctly during TLS handshake Changes requested by rhalade

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens [v4]

2021-01-13 Thread Daniel Fuchs
On Thu, 7 Jan 2021 00:32:42 GMT, Yasumasa Suenaga wrote: >> @ChrisHegarty @dfuch could you review new change? It updates a testcase. > > PING: could you review this PR? Hi Yasumasa, The new StreamCloseTest seems to be suffering from some race conditions; On windows I saw it failing 29 times ou

Re: RFR: 8259662: SocketException should be passed through [v2]

2021-01-13 Thread Clive Verghese
On Wed, 13 Jan 2021 18:41:26 GMT, Rajan Halade wrote: >> Clive Verghese has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix bugids and use server port passed as a parameter > > test/jdk/sun/security/ssl/SSLContextImpl/ShouldThrowSSLExcep

Re: RFR: 8259662: SocketException should be passed through [v2]

2021-01-13 Thread Clive Verghese
> Redo for 8237578: JDK-8214339 (SSLSocketImpl wraps SocketException) appears > to not be fully fixed > > This also fixes JDK-8259516: Alerts sent by peer may not be received > correctly during TLS handshake Clive Verghese has updated the pull request incrementally with one additional commit s

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens [v5]

2021-01-13 Thread Yasumasa Suenaga
> `InputStream` from `BodyPublishers.ofInputStream()` is usually closed when > the stream reaches EOF. However IOE handler returns without closing. > > I confirmed this problem in `BodyPublishers.ofInputStream()`, but I think > `BodyPublishers.ofFile()`has same problem because it also use > `St

Re: RFR: 8257736: InputStream from BodyPublishers.ofInputStream() leaks when IOE happens [v5]

2021-01-13 Thread Yasumasa Suenaga
On Wed, 13 Jan 2021 18:59:30 GMT, Daniel Fuchs wrote: >> PING: could you review this PR? > > Hi Yasumasa, > > The new StreamCloseTest seems to be suffering from some race conditions; On > windows I saw it failing 29 times out of 50. > > config StreamCloseTest.setup(): success > test StreamClos