RFR: 8274016: Replace 'for' cycles with iterator with enhanced-for in java.desktop [v2]
Andrey Turbanov
github.com+741251+turbanoff at openjdk.java.net
Thu Sep 23 07:51:43 UTC 2021
On Thu, 23 Sep 2021 04:43:55 GMT, Sergey Bylokhov <serb at openjdk.org> 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 in SimpleRenderedImage
>
> src/java.desktop/share/classes/com/sun/imageio/plugins/common/SimpleRenderedImage.java line 285:
>
>> 283: }
>> 284:
>> 285: // Copy the strings from the Vector over to a String array.
>
> Looks like JDK-8271603 missed "Vector" here.
Fixed.
> src/java.desktop/share/classes/com/sun/imageio/plugins/common/SimpleRenderedImage.java line 289:
>
>> 287: int count = 0;
>> 288: for (String name : names) {
>> 289: prefixNames[count++] = name;
>
> Why we cannot use names.toArray here?
We can. Updated.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5578
More information about the client-libs-dev
mailing list