RFR: 8274237: Replace 'for' cycles with iterator with enhanced-for in java.base

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. Sometimes we even don't need cycle at all

Integrated: 8273261: Replace 'while' cycles with iterator with enhanced-for in java.base

2021-09-23 Thread Andrey Turbanov
On Wed, 1 Sep 2021 07:37:53 GMT, Andrey Turbanov wrote: > There are few places in code where manual while loop is used with Iterator to > iterate over Collection. > Instead of manual while cycles it's preferred to use enhanced-for cycle > instead: it's less verbose, makes code easier to read a

Re: RFR: 8273261: Replace 'while' cycles with iterator with enhanced-for in java.base

2021-09-23 Thread Andrey Turbanov
On Wed, 1 Sep 2021 07:37:53 GMT, Andrey Turbanov wrote: > There are few places in code where manual while loop is used with Iterator to > iterate over Collection. > Instead of manual while cycles it's preferred to use enhanced-for cycle > instead: it's less verbose, makes code easier to read a

Re: RFR: 8238274: (sctp) JDK-7118373 is not fixed for SctpChannel

2021-09-23 Thread Daniel Fuchs
On Mon, 13 Sep 2021 11:44:17 GMT, Masanori Yano wrote: >> I have run this change on one of our machines that support SCTP. I did get >> some intermittent failures with the other SCTP tests - they don't seem much >> stable - but the new proposed test was failing all the time. I suspect that >>

Re: RFR: 8238274: (sctp) JDK-7118373 is not fixed for SctpChannel [v4]

2021-09-23 Thread Daniel Fuchs
On Wed, 22 Sep 2021 12:27:03 GMT, Masanori Yano wrote: >> Please review this change to the Unix implementations of >> sun.nio.ch.sctp.Sctp*ChannelImpl#implCloseSelectableChannel() >> to be same as SocketChannelImpl at JDK-7118373. (The preClose is missing a >> check for the ST_KILLED state.) >