Github user tkruse commented on a diff in the pull request:

    https://github.com/apache/groovy/pull/360#discussion_r69213942
  
    --- Diff: src/main/groovy/lang/ObjectRange.java ---
    @@ -240,16 +237,16 @@ public Object get(int index) {
             if (index < 0) {
                 throw new IndexOutOfBoundsException("Index: " + index + " 
should not be negative");
             }
    -        final StepIterator iter = new StepIterator(this, 1);
     
    -        Object value = iter.next();
    -        for (int i = 0; i < index; i++) {
    -            if (!iter.hasNext()) {
    +        int i = 0;
    +        for (Iterator it = iterator(); ; i++) {
    --- End diff --
    
    and generally it is unclear to me why you changed the loop style here. I am 
not sure the new structure is objectively better than before.


---
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.
---

Reply via email to