Github user paplorinc commented on a diff in the pull request: https://github.com/apache/groovy/pull/360#discussion_r69117171 --- Diff: src/main/groovy/lang/ObjectRange.java --- @@ -408,107 +401,66 @@ public void step(int step, Closure closure) { */ @Override public Iterator iterator() { - // non thread-safe iterator - final Iterator innerIterator = new StepIterator(this, 1); - final Iterator safeIterator = new Iterator() { + return new Iterator() { + private final Iterator delegate = new StepIterator(ObjectRange.this, 1); + @Override public synchronized boolean hasNext() { - return innerIterator.hasNext(); + return delegate.hasNext(); --- End diff -- Thanks @tkruse, force pushed a new version :)
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---