groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwagenleit...@apache.org
Subject [5/5] groovy git commit: Removed uncessery Integer Object creation
Date Tue, 23 Aug 2016 02:16:00 GMT
Removed uncessery Integer Object creation


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/b914a744
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/b914a744
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/b914a744

Branch: refs/heads/master
Commit: b914a744705b7fc1145a7967fb8660fbb5af97a9
Parents: c2da84b
Author: Anand upadhyay <anand.upadhyay.consultant@nielsen.com>
Authored: Fri Aug 19 21:38:35 2016 +0530
Committer: John Wagenleitner <jwagenleitner@apache.org>
Committed: Mon Aug 22 19:11:51 2016 -0700

----------------------------------------------------------------------
 src/main/groovy/lang/IntRange.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/b914a744/src/main/groovy/lang/IntRange.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/lang/IntRange.java b/src/main/groovy/lang/IntRange.java
index 8493d1f..46e9b4a 100644
--- a/src/main/groovy/lang/IntRange.java
+++ b/src/main/groovy/lang/IntRange.java
@@ -422,7 +422,7 @@ public class IntRange extends AbstractList<Integer> implements Range<Integer>
{
         final int from = this.getFrom();
         final int to = this.getTo();
 
-        hashCode = new Integer(((from+to+1)*(from+to))/2).intValue()+to;
+        hashCode = ((from+to+1)*(from+to))/2+to;
         return hashCode;
     }
 }


Mime
View raw message