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

    https://github.com/apache/groovy/pull/388#discussion_r75499884
  
    --- Diff: src/main/groovy/lang/IntRange.java ---
    @@ -415,4 +415,14 @@ public void step(int step, Closure closure) {
             step(step, adapter);
             return adapter.asList();
         }
    +
    +    @Override
    +    public int hashCode(){
    +        int hashCode;
    +        final int from = this.getFrom();
    +        final int to = this.getTo();
    +
    +        hashCode = new Integer(((from+to+1)*(from+to))/2).intValue()+to;
    --- End diff --
    
    No need to create a new `Integer` here.


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