Re: [OpenJDK 2D-Dev] RFR: 8258006: Replaces while cycles with iterator with enhanced for in java.desktop [v2]

2020-12-19 Thread Sergey Bylokhov
On Tue, 15 Dec 2020 15:24:03 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 e

[OpenJDK 2D-Dev] Integrated: 8258006: Replaces while cycles with iterator with enhanced for in java.desktop

2020-12-19 Thread Andrey Turbanov
On Wed, 2 Dec 2020 19:23:28 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

[OpenJDK 2D-Dev] RFR: 8257809: JNI warnings from Toolkit JPEG image decoding

2020-12-19 Thread Phil Race
The fix is to reverse the order of acquisition to get dst before src so that the call to GetArrayLength() comes first. This also necessitates moving the RELEASE_ARRAYS() call on an error condition to the new "2nd" block. The new regression test passes on all platforms and all the other headless