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

List:       openjdk-2d-dev
Subject:    Re: [OpenJDK 2D-Dev] RFR: 8258006: Replaces while cycles with iterator with enhanced for in java.des
From:       Sergey Bylokhov <serb () openjdk ! java ! net>
Date:       2020-12-19 22:16:56
Message-ID: sbItCkKSBO4j8XuTKeyocNgRVNEx7cy95GfXZzkDfxs=.ae2b1720-d83a-4486-b480-b79785334eb0 () github ! com
[Download RAW message or body]

On Tue, 15 Dec 2020 15:24:03 GMT, Andrey Turbanov \
<github.com+741251+turbanoff@openjdk.org> 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 and \
> > it's less error-prone. It doesn't have any performance impact: java compiler \
> > generates similar code when compiling _enhanced-for_ cycle. 
> > See similar cleanup in C++ code - #1707
> 
> Andrey Turbanov has updated the pull request with a new target base due to a merge \
> or a rebase. The pull request now contains one commit: 
> 8258006: Replace 'while' cycles with iterator with enhanced 'for' in java.desktop

Marked as reviewed by serb (Reviewer).

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

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


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

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