Integrated: JDK-8257401: Use switch expressions in jdk.internal.net.http and java.net.http

2020-12-04 Thread Kartik Ohri
ll request has now been integrated. Changeset: ac549008 Author:Kartik Ohri URL: https://git.openjdk.java.net/jdk/commit/ac549008 Stats: 271 lines in 17 files changed: 2 ins; 124 del; 145 mod 8257401: Use switch expressions in jdk.internal.net.http and java.net.http Reviewed-

Re: RFR: JDK-8257401: Use switch expressions in jdk.internal.net.http and java.net.http [v5]

2020-12-04 Thread Patrick Concannon
On Fri, 4 Dec 2020 11:22:34 GMT, Kartik Ohri wrote: > @pconcannon, If everything is in order, can you please approve the changes on > Github. I'll then issue the integrate command. Thanks. Hi @amCap1712, you will have to /integrate first, and then afterwards I will sponsor - PR:

Re: RFR: JDK-8257401: Use switch expressions in jdk.internal.net.http and java.net.http [v5]

2020-12-04 Thread Kartik Ohri
On Wed, 2 Dec 2020 16:35:24 GMT, Daniel Fuchs wrote: >> Kartik Ohri has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Align -> and remove trailing whitespace > > Marked as reviewed by dfuchs (Reviewer). @pconcannon, If everything is in or

Re: RFR: JDK-8257401: Use switch expressions in jdk.internal.net.http and java.net.http [v5]

2020-12-02 Thread Daniel Fuchs
On Wed, 2 Dec 2020 16:34:17 GMT, Kartik Ohri wrote: >> Hi! >> Kindly review this patch to replace switch statements with switch >> expressions (where it makes sense) in the http client modules. The rationale >> is to improve readability of the code. >> Regards, >> Kartik > > Kartik Ohri has up

Re: RFR: JDK-8257401: Use switch expressions in jdk.internal.net.http and java.net.http [v4]

2020-12-02 Thread Patrick Concannon
On Wed, 2 Dec 2020 16:28:44 GMT, Kartik Ohri wrote: >> src/java.net.http/share/classes/jdk/internal/net/http/Http1HeaderParser.java >> line 119: >> >>> 117: while (canContinueParsing(input)) { >>> 118: switch (state) { >>> 119: case INITIAL ->

Re: RFR: JDK-8257401: Use switch expressions in jdk.internal.net.http and java.net.http [v4]

2020-12-02 Thread Kartik Ohri
On Wed, 2 Dec 2020 16:15:13 GMT, Chris Hegarty wrote: >> Kartik Ohri has refreshed the contents of this pull request, and previous >> commits have been removed. The incremental views will show differences >> compared to the previous content of the PR. > > I think that the actual source changes

Re: RFR: JDK-8257401: Use switch expressions in jdk.internal.net.http and java.net.http [v4]

2020-12-02 Thread Patrick Concannon
On Wed, 2 Dec 2020 09:42:09 GMT, Kartik Ohri wrote: >> Hi! >> Kindly review this patch to replace switch statements with switch >> expressions (where it makes sense) in the http client modules. The rationale >> is to improve readability of the code. >> Regards, >> Kartik > > Kartik Ohri has re

Re: RFR: JDK-8257401: Use switch expressions in jdk.internal.net.http and java.net.http [v4]

2020-12-02 Thread Kartik Ohri
On Wed, 2 Dec 2020 16:23:11 GMT, Daniel Fuchs wrote: >> Kartik Ohri has refreshed the contents of this pull request, and previous >> commits have been removed. The incremental views will show differences >> compared to the previous content of the PR. > > src/java.net.http/share/classes/jdk/inte

Re: RFR: JDK-8257401: Use switch expressions in jdk.internal.net.http and java.net.http [v4]

2020-12-02 Thread Kartik Ohri
On Wed, 2 Dec 2020 16:26:43 GMT, Patrick Concannon wrote: >> Kartik Ohri has refreshed the contents of this pull request, and previous >> commits have been removed. The incremental views will show differences >> compared to the previous content of the PR. > > src/java.net.http/share/classes/jd

Re: RFR: JDK-8257401: Use switch expressions in jdk.internal.net.http and java.net.http [v5]

2020-12-02 Thread Kartik Ohri
> Hi! > Kindly review this patch to replace switch statements with switch expressions > (where it makes sense) in the http client modules. The rationale is to > improve readability of the code. > Regards, > Kartik Kartik Ohri has updated the pull request incrementally with one additional commit

Re: RFR: JDK-8257401: Use switch expressions in jdk.internal.net.http and java.net.http [v4]

2020-12-02 Thread Daniel Fuchs
On Wed, 2 Dec 2020 09:42:09 GMT, Kartik Ohri wrote: >> Hi! >> Kindly review this patch to replace switch statements with switch >> expressions (where it makes sense) in the http client modules. The rationale >> is to improve readability of the code. >> Regards, >> Kartik > > Kartik Ohri has re

Re: RFR: JDK-8257401: Use switch expressions in jdk.internal.net.http and java.net.http [v4]

2020-12-02 Thread Chris Hegarty
On Wed, 2 Dec 2020 09:42:09 GMT, Kartik Ohri wrote: >> Hi! >> Kindly review this patch to replace switch statements with switch >> expressions (where it makes sense) in the http client modules. The rationale >> is to improve readability of the code. >> Regards, >> Kartik > > Kartik Ohri has re

Re: RFR: JDK-8257401: Use switch expressions in jdk.internal.net.http and java.net.http [v4]

2020-12-02 Thread Kartik Ohri
> Hi! > Kindly review this patch to replace switch statements with switch expressions > (where it makes sense) in the http client modules. The rationale is to > improve readability of the code. > Regards, > Kartik Kartik Ohri has refreshed the contents of this pull request, and previous commits

Re: RFR: JDK-8257401: Use switch expressions in jdk.internal.net.http and java.net.http [v3]

2020-12-02 Thread Kartik Ohri
> Hi! > Kindly review this patch to replace switch statements with switch expressions > (where it makes sense) in the http client modules. The rationale is to > improve readability of the code. > Regards, > Kartik Kartik Ohri has updated the pull request incrementally with one additional commit

Re: RFR: JDK-8257401: Use switch expressions in jdk.internal.net.http and java.net.http

2020-12-01 Thread Daniel Fuchs
On Tue, 1 Dec 2020 01:51:35 GMT, John Jiang wrote: > Do we have clear guideline or requirement for using this new lang feature? > We know there are a lot of old switch-case blocks in the existing codes, > including source codes and test codes. @johnshajiang I don't think we have any global guide

Re: RFR: JDK-8257401: Use switch expressions in jdk.internal.net.http and java.net.http [v2]

2020-12-01 Thread Patrick Concannon
On Mon, 30 Nov 2020 13:04:11 GMT, Kartik Ohri wrote: >> Hi! >> Kindly review this patch to replace switch statements with switch >> expressions (where it makes sense) in the http client modules. The rationale >> is to improve readability of the code. >> Regards, >> Kartik > > Kartik Ohri has r

Re: RFR: JDK-8257401: Use switch expressions in jdk.internal.net.http and java.net.http

2020-11-30 Thread John Jiang
On Sat, 21 Nov 2020 11:45:42 GMT, Kartik Ohri wrote: > Hi! > Kindly review this patch to replace switch statements with switch expressions > (where it makes sense) in the http client modules. The rationale is to > improve readability of the code. > Regards, > Kartik Just a question. Do we hav

Re: Use switch expressions in jdk.internal.net.http and java.net.http

2020-11-30 Thread Kartik Ohri
st suite and it came back fine so I’ve > created a JIRA issue to track your fix: > https://bugs.openjdk.java.net/browse/JDK-8257401. > > Now that you have a bug ID for your changes, can you update the commit > message for the PR to use the format `bug id : message` i.e. `825740

Re: RFR: JDK-8257401: Use switch expressions in jdk.internal.net.http and java.net.http [v2]

2020-11-30 Thread Kartik Ohri
uest, and previous commits have been removed. The incremental views will show differences compared to the previous content of the PR. The pull request contains one new commit since the last revision: JDK-8257401: Use switch expressions in jdk.internal.net.http and java.net.http - Chang

RFR: JDK-8257401: Use switch expressions in jdk.internal.net.http and java.net.http

2020-11-30 Thread Kartik Ohri
Hi! Kindly review this patch to replace switch statements with switch expressions (where it makes sense) in the http client modules. The rationale is to improve readability of the code. Regards, Kartik - Commit messages: - Use switch expressions in jdk.internal.net.http and

Re: Use switch expressions in jdk.internal.net.http and java.net.http

2020-11-30 Thread Patrick Concannon
: message` i.e. `8257401: Use switch expressions in jdk.internal.net.http and java.net.http` If you need any help with this please let me know. Kind regards, Patrick > On 25 Nov 2020, at 16:48, Patrick Concannon > wrote: > > Hi Kartik, > > Thanks for running the tests. I’m n

Re: Use switch expressions in jdk.internal.net.http and java.net.http

2020-11-25 Thread Patrick Concannon
Hi Kartik, Thanks for running the tests. I’m not sure about your problem on Ubuntu 20.10, but I’ll take a look into it. Just so you know, you can also run tests using jtreg. You can find more information on how to do that here: http://openjdk.java.net/jtreg/runtests.html I’ll import your patch

Re: Use switch expressions in jdk.internal.net.http and java.net.http

2020-11-25 Thread Kartik Ohri
Hi Chris and Patrick, It is the first time I am running the tier2 tests so I am not sure if I am doing it correctly. I'll share what I did and my observations. I executed make run-test-tier2 on my Ubuntu 20.10 machine and the tests failed to build due to some warnings in a hostpot jtreg test. The

Re: Use switch expressions in jdk.internal.net.http and java.net.http

2020-11-23 Thread Patrick Concannon
Hi Kartik, Thanks for submitting the patch. Once you’ve run the tier2 tests, I’d be happy to sponsor it for you. -Patrick > On 23 Nov 2020, at 09:09, Chris Hegarty wrote: > > Hi Kartik, > >> On 21 Nov 2020, at 12:01, Kartik Ohri wrote: >> >> Hi! >> I would like to submit this patch https:

Re: Use switch expressions in jdk.internal.net.http and java.net.http

2020-11-23 Thread Chris Hegarty
Hi Kartik, > On 21 Nov 2020, at 12:01, Kartik Ohri wrote: > > Hi! > I would like to submit this patch https://github.com/openjdk/jdk/pull/1364 > with the rationale to improve the > readability of the code. Can someone please take a look at it and crea

Use switch expressions in jdk.internal.net.http and java.net.http

2020-11-21 Thread Kartik Ohri
Hi! I would like to submit this patch https://github.com/openjdk/jdk/pull/1364 with the rationale to improve the readability of the code. Can someone please take a look at it and create a public issue if the patch is OK to be included ? Thanks, Kartik