Re: RFR: 8284567: Collapse identical catch branches in java.base

2022-04-08 Thread Bradford Wetmore
On Sat, 2 Apr 2022 16:05:06 GMT, Andrey Turbanov wrote: > Let's take advantage of Java 7 language feature - "Catching Multiple > Exception Types". > It simplifies code. Reduces duplication. > Found by IntelliJ IDEA inspection Identical 'catch' branches in 'try' > statement LGTM -

Re: RFR: 8284567: Collapse identical catch branches in java.base

2022-04-08 Thread Bradford Wetmore
On Sat, 2 Apr 2022 16:05:06 GMT, Andrey Turbanov wrote: > Let's take advantage of Java 7 language feature - "Catching Multiple > Exception Types". > It simplifies code. Reduces duplication. > Found by IntelliJ IDEA inspection Identical 'catch' branches in 'try' > statement src/java.base/share/

Re: RFR: 8284567: Collapse identical catch branches in java.base

2022-04-08 Thread Iris Clark
On Sat, 2 Apr 2022 16:05:06 GMT, Andrey Turbanov wrote: > Let's take advantage of Java 7 language feature - "Catching Multiple > Exception Types". > It simplifies code. Reduces duplication. > Found by IntelliJ IDEA inspection Identical 'catch' branches in 'try' > statement Marked as reviewed b

Re: RFR: 8284567: Collapse identical catch branches in java.base

2022-04-08 Thread Joe Darcy
On Sat, 2 Apr 2022 16:05:06 GMT, Andrey Turbanov wrote: > Let's take advantage of Java 7 language feature - "Catching Multiple > Exception Types". > It simplifies code. Reduces duplication. > Found by IntelliJ IDEA inspection Identical 'catch' branches in 'try' > statement Core libs changes lo

Re: RFR: 8283544: HttpClient GET method adds Content-Length: 0 header [v5]

2022-04-08 Thread Jaikiran Pai
On Fri, 8 Apr 2022 09:35:31 GMT, Jaikiran Pai wrote: > This is unlike other methods, for example DELETE() where the body publisher > itself is null. In the case of HEAD the body publisher is present but it > still represents that there's no body to that request. Please disregard this part of t

Re: RFR: 8277969: HttpClient SelectorManager shuts down when custom Executor rejects a task [v4]

2022-04-08 Thread Daniel Fuchs
> These changes make sure that pending requests are terminated if the selector > manager thread exits due to exceptions. > This includes: >1. completing CompletableFutures that were returned to the caller code >2. cancelling requests that are in flight >3. calling onError on BodySubscr

Re: RFR: 8283544: HttpClient GET method adds Content-Length: 0 header [v5]

2022-04-08 Thread Jaikiran Pai
On Thu, 7 Apr 2022 13:53:35 GMT, Conor Cleary wrote: >> **Issue** >> When using the `HttpClient.send()` to send a GET request created using the >> `HttpRequest.newBuilder()`, a `Content-length: 0` header is set. This >> behaviour causes issues with many services as a body related header is >>

Re: RFR: 8282395: URL.openConnection can throw IOOBE

2022-04-08 Thread Daniel Fuchs
On Fri, 8 Apr 2022 07:52:55 GMT, KIRIYAMA Takuya wrote: > I fixed sun.net.www.ParseUtil.decode(). > > ParseUtil.decode() always tries to decode after parsing '%', so if '%' is > located at the end of the String, IndexOutOfBoundsException is thrown. Also, > if '%' is shown after decodable strin

Re: RFR: 8283544: HttpClient GET method adds Content-Length: 0 header [v5]

2022-04-08 Thread Conor Cleary
On Thu, 7 Apr 2022 13:53:35 GMT, Conor Cleary wrote: >> **Issue** >> When using the `HttpClient.send()` to send a GET request created using the >> `HttpRequest.newBuilder()`, a `Content-length: 0` header is set. This >> behaviour causes issues with many services as a body related header is >>

Re: RFR: 8277969: HttpClient SelectorManager shuts down when custom Executor rejects a task [v3]

2022-04-08 Thread Michael McMahon
On Thu, 10 Mar 2022 11:17:26 GMT, Daniel Fuchs wrote: >> These changes make sure that pending requests are terminated if the selector >> manager thread exits due to exceptions. >> This includes: >>1. completing CompletableFutures that were returned to the caller code >>2. cancelling requ

Re: RFR: 8282395: URL.openConnection can throw IOOBE

2022-04-08 Thread Alan Bateman
On Fri, 8 Apr 2022 07:52:55 GMT, KIRIYAMA Takuya wrote: > I fixed sun.net.www.ParseUtil.decode(). > > ParseUtil.decode() always tries to decode after parsing '%', so if '%' is > located at the end of the String, IndexOutOfBoundsException is thrown. Also, > if '%' is shown after decodable strin

RFR: 8282395: URL.openConnection can throw IOOBE

2022-04-08 Thread KIRIYAMA Takuya
I fixed sun.net.www.ParseUtil.decode(). ParseUtil.decode() always tries to decode after parsing '%', so if '%' is located at the end of the String, IndexOutOfBoundsException is thrown. Also, if '%' is shown after decodable string and following string is not decodable (e.g: "%25%s%G1"), ParseUti