Suspicious 'completed' variable in ResponseContent.UnknownLengthBodyParser#accept

2021-08-18 Thread Andrey Turbanov
Hello During investigation of results of IDEA inspections I found suspicious code in a method 'jdk.internal.net.http.ResponseContent.UnknownLengthBodyParser#accept' https://github.com/openjdk/jdk/blob/master/src/java.net.http/share/classes/jdk/internal/net/http/ResponseContent.java#L492 boolean c

Re: Suspicious 'completed' variable in ResponseContent.UnknownLengthBodyParser#accept

2021-08-18 Thread Daniel Fuchs
Hi Andrey, Thanks for the notice. I believe the variable is not needed, it's probably a copy-paste error. You will see that such a variable is also declared in the FixedLengthBodyParser where it's actually used. The UnknownLenghtParser will parse the bytes until the connection is closed (or an e

RFR: 8272626: Avoid C-style array declarations in java.*

2021-08-18 Thread Claes Redestad
C-style array declarations generate noisy warnings in IDEs, et.c. This patch cleans up all java.* packages. (Copyrights intentionally not updated due the triviality of most changes) - Commit messages: - Avoid C-style array declarations in java packages Changes: https://git.openjdk

Re: RFR: 8272626: Avoid C-style array declarations in java.*

2021-08-18 Thread Daniel Fuchs
On Wed, 18 Aug 2021 10:07:35 GMT, Claes Redestad wrote: > C-style array declarations generate noisy warnings in IDEs, et.c. This patch > cleans up all java.* packages. > > (Copyrights intentionally not updated due the triviality of most changes) Marked as reviewed by dfuchs (Reviewer). --

Re: RFR: 8272626: Avoid C-style array declarations in java.*

2021-08-18 Thread Alan Bateman
On Wed, 18 Aug 2021 10:07:35 GMT, Claes Redestad wrote: > C-style array declarations generate noisy warnings in IDEs, et.c. This patch > cleans up all java.* packages. > > (Copyrights intentionally not updated due the triviality of most changes) Marked as reviewed by alanb (Reviewer). ---

Re: RFR: 8272626: Avoid C-style array declarations in java.*

2021-08-18 Thread Claes Redestad
On Wed, 18 Aug 2021 10:07:35 GMT, Claes Redestad wrote: > C-style array declarations generate noisy warnings in IDEs, et.c. This patch > cleans up all java.* packages. > > (Copyrights intentionally not updated due the triviality of most changes) Thanks for reviewing, Daniel and Alan!

Integrated: 8272626: Avoid C-style array declarations in java.*

2021-08-18 Thread Claes Redestad
On Wed, 18 Aug 2021 10:07:35 GMT, Claes Redestad wrote: > C-style array declarations generate noisy warnings in IDEs, et.c. This patch > cleans up all java.* packages. > > (Copyrights intentionally not updated due the triviality of most changes) This pull request has now been integrated. Chan

Re: RFR: 8272626: Avoid C-style array declarations in java.*

2021-08-18 Thread Roger Riggs
On Wed, 18 Aug 2021 10:07:35 GMT, Claes Redestad wrote: > C-style array declarations generate noisy warnings in IDEs, et.c. This patch > cleans up all java.* packages. > > (Copyrights intentionally not updated due the triviality of most changes) 34 Minutes from proposed to integrated! Its hard

Re: RFR: 8272626: Avoid C-style array declarations in java.*

2021-08-18 Thread Joe Darcy
On 8/18/2021 6:20 AM, Roger Riggs wrote: On Wed, 18 Aug 2021 10:07:35 GMT, Claes Redestad wrote: C-style array declarations generate noisy warnings in IDEs, et.c. This patch cleans up all java.* packages. (Copyrights intentionally not updated due the triviality of most changes) 34 Minutes