Re: RFR: 8269124: Update java.time to use switch expressions (part II) [v2]

2021-06-24 Thread Patrick Concannon
On Wed, 23 Jun 2021 17:54:30 GMT, Daniel Fuchs wrote: >> I'd personally replace all the applicable locations, as otherwise, it would >> confuse why there are two idioms. But it is outside of this PR so probably >> for another day. > > I agree with Naoto that it's a bit strange. OK. If you

Re: RFR: 8269124: Update java.time to use switch expressions (part II) [v2]

2021-06-23 Thread Daniel Fuchs
On Wed, 23 Jun 2021 16:35:30 GMT, Naoto Sato wrote: >> Hi Naoto, I decided to only introduce the`instanceof` pattern variable where >> I thought it would add additional value to the code. In situations like this >> one, I thought there wasn't much point as the cast variable is only used >>

Re: RFR: 8269124: Update java.time to use switch expressions (part II) [v2]

2021-06-23 Thread Naoto Sato
On Wed, 23 Jun 2021 10:39:06 GMT, Patrick Concannon wrote: >> src/java.base/share/classes/java/time/Instant.java line 562: >> >>> 560: public int get(TemporalField field) { >>> 561: if (field instanceof ChronoField) { >>> 562: return switch ((ChronoField) field) { >>

Re: RFR: 8269124: Update java.time to use switch expressions (part II) [v2]

2021-06-23 Thread Patrick Concannon
On Tue, 22 Jun 2021 17:27:58 GMT, Naoto Sato wrote: >> Patrick Concannon has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8269124: Added missing brace; fixed build issue > > src/java.base/share/classes/java/time/Instant.java line 562: >

Re: RFR: 8269124: Update java.time to use switch expressions (part II) [v2]

2021-06-22 Thread Naoto Sato
On Tue, 22 Jun 2021 16:07:12 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review the second half of my update for the `java.time` >> package to make use of switch expressions? >> >> This PR was split into two parts due to the large number of files affected. >> >> Kind

Re: RFR: 8269124: Update java.time to use switch expressions (part II) [v2]

2021-06-22 Thread Iris Clark
On Tue, 22 Jun 2021 16:07:12 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review the second half of my update for the `java.time` >> package to make use of switch expressions? >> >> This PR was split into two parts due to the large number of files affected. >> >> Kind

Re: RFR: 8269124: Update java.time to use switch expressions (part II) [v2]

2021-06-22 Thread Aleksei Efimov
On Tue, 22 Jun 2021 16:07:12 GMT, Patrick Concannon wrote: >> Hi, >> >> Could someone please review the second half of my update for the `java.time` >> package to make use of switch expressions? >> >> This PR was split into two parts due to the large number of files affected. >> >> Kind

Re: RFR: 8269124: Update java.time to use switch expressions (part II) [v2]

2021-06-22 Thread Patrick Concannon
On Tue, 22 Jun 2021 15:40:12 GMT, Aleksei Efimov wrote: >> Patrick Concannon has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8269124: Added missing brace; fixed build issue > > src/java.base/share/classes/java/time/Instant.java line

Re: RFR: 8269124: Update java.time to use switch expressions (part II) [v2]

2021-06-22 Thread Patrick Concannon
> Hi, > > Could someone please review the second half of my update for the `java.time` > package to make use of switch expressions? > > This PR was split into two parts due to the large number of files affected. > > Kind regards, > > Patrick Patrick Concannon has updated the pull request