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:56:17 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/481d4e5e
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/481d4e5e
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/481d4e5e

Branch: refs/heads/GROOVY_2_4_X
Commit: 481d4e5e972dcb3b8a87eb550fd19f52df69cb85
Parents: e5cc59e
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:17:22 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/481d4e5e/src/main/groovy/lang/IntRange.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/lang/IntRange.java b/src/main/groovy/lang/IntRange.java
index 867a9f8..154658b 100644
--- a/src/main/groovy/lang/IntRange.java
+++ b/src/main/groovy/lang/IntRange.java
@@ -408,7 +408,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