Re: RFR: 8274016: Replace 'for' cycles with iterator with enhanced-for in java.desktop [v3]

2021-09-24 Thread Sergey Bylokhov
On Thu, 23 Sep 2021 09:47:21 GMT, Andrey Turbanov wrote: >> There are few places in code where manual `for` loop is used with Iterator >> to iterate over Collection. >> Instead of manual `for` cycles it's preferred to use enhanced-for cycle >> instead: it's less verbose, makes code easier to r

Re: RFR: 8274016: Replace 'for' cycles with iterator with enhanced-for in java.desktop [v2]

2021-09-23 Thread Andrey Turbanov
On Thu, 23 Sep 2021 08:35:38 GMT, Sergey Bylokhov wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8274016: Replace 'for' cycles with iterator with enhanced-for in >> java.desktop >> cleanup toArray conversion

Re: RFR: 8274016: Replace 'for' cycles with iterator with enhanced-for in java.desktop [v3]

2021-09-23 Thread Andrey Turbanov
> There are few places in code where manual `for` loop is used with Iterator to > iterate over Collection. > Instead of manual `for` cycles it's preferred to use enhanced-for cycle > instead: it's less verbose, makes code easier to read and it's less > error-prone. > It doesn't have any performa

Re: RFR: 8274016: Replace 'for' cycles with iterator with enhanced-for in java.desktop [v2]

2021-09-23 Thread Sergey Bylokhov
On Thu, 23 Sep 2021 07:51:39 GMT, Andrey Turbanov wrote: >> There are few places in code where manual `for` loop is used with Iterator >> to iterate over Collection. >> Instead of manual `for` cycles it's preferred to use enhanced-for cycle >> instead: it's less verbose, makes code easier to r

Re: RFR: 8274016: Replace 'for' cycles with iterator with enhanced-for in java.desktop [v2]

2021-09-23 Thread Andrey Turbanov
On Thu, 23 Sep 2021 04:43:55 GMT, Sergey Bylokhov wrote: >> Andrey Turbanov has updated the pull request incrementally with one >> additional commit since the last revision: >> >> 8274016: Replace 'for' cycles with iterator with enhanced-for in >> java.desktop >> cleanup toArray conversion

Re: RFR: 8274016: Replace 'for' cycles with iterator with enhanced-for in java.desktop [v2]

2021-09-23 Thread Andrey Turbanov
> There are few places in code where manual `for` loop is used with Iterator to > iterate over Collection. > Instead of manual `for` cycles it's preferred to use enhanced-for cycle > instead: it's less verbose, makes code easier to read and it's less > error-prone. > It doesn't have any performa

Re: RFR: 8274016: Replace 'for' cycles with iterator with enhanced-for in java.desktop

2021-09-22 Thread Sergey Bylokhov
On Sun, 19 Sep 2021 10:13:49 GMT, Andrey Turbanov wrote: > There are few places in code where manual `for` loop is used with Iterator to > iterate over Collection. > Instead of manual `for` cycles it's preferred to use enhanced-for cycle > instead: it's less verbose, makes code easier to read

Re: RFR: 8274016: Replace 'for' cycles with iterator with enhanced-for in java.desktop

2021-09-20 Thread Aleksey Shipilev
On Sun, 19 Sep 2021 10:13:49 GMT, Andrey Turbanov wrote: > There are few places in code where manual `for` loop is used with Iterator to > iterate over Collection. > Instead of manual `for` cycles it's preferred to use enhanced-for cycle > instead: it's less verbose, makes code easier to read

RFR: 8274016: Replace 'for' cycles with iterator with enhanced-for in java.desktop

2021-09-20 Thread Andrey Turbanov
There are few places in code where manual `for` loop is used with Iterator to iterate over Collection. Instead of manual `for` cycles it's preferred to use enhanced-for cycle instead: it's less verbose, makes code easier to read and it's less error-prone. It doesn't have any performance impact: j