[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    Re: RFR: 8274395: Use enhanced-for instead of plain 'for' in jdk.internal.jvmstat [v2]
From:       Serguei Spitsyn <sspitsyn () openjdk ! java ! net>
Date:       2021-09-30 9:43:35
Message-ID: w1ij8M6_A-0d5iHkmnyeCI7Dmr_CCzn3qdoZI5imglo=.1e9cf14b-77d8-47bd-83d3-3af809a11f07 () github ! com
[Download RAW message or body]

On Tue, 28 Sep 2021 07:32:47 GMT, Andrey Turbanov \
<github.com+741251+turbanoff@openjdk.org> wrote:

> > There are few places in code where manual `for` loop is used with Iterator to \
> > iterate over Collection or Array. 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: javac compiler \
> > generates similar code when compiling enhanced-for cycle. Similar cleanups:
> > 1. [JDK-8274016](https://bugs.openjdk.java.net/browse/JDK-8274016) java.desktop
> > 2. [JDK-8274237](https://bugs.openjdk.java.net/browse/JDK-8274237) java.base
> > 3. [JDK-8274261](https://bugs.openjdk.java.net/browse/JDK-8274261) jdk.jcmd
> > 4. [JDK-8274318](https://bugs.openjdk.java.net/browse/JDK-8274318) \
> > java.management
> 
> Andrey Turbanov has updated the pull request incrementally with one additional \
> commit since the last revision: 
> 8274395: Use enhanced-for instead of plain 'for' in jdk.internal.jvmstat
> update copyright

Looks good.
Thanks,
Serguei

-------------

Marked as reviewed by sspitsyn (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/5580


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic