groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jwagenleit...@apache.org
Subject groovy git commit: refactor(core): use uppercase L for long literal
Date Sun, 22 May 2016 01:24:58 GMT
Repository: groovy
Updated Branches:
  refs/heads/master 237d16ee3 -> ff2383816


refactor(core): use uppercase L for long literal


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

Branch: refs/heads/master
Commit: ff2383816bd184036cab1c1d7672ea29f09e02dc
Parents: 237d16e
Author: John Wagenleitner <jwagenleitner@apache.org>
Authored: Sat May 21 18:21:41 2016 -0700
Committer: John Wagenleitner <jwagenleitner@apache.org>
Committed: Sat May 21 18:21:41 2016 -0700

----------------------------------------------------------------------
 src/main/org/codehaus/groovy/runtime/MetaClassHelper.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/ff238381/src/main/org/codehaus/groovy/runtime/MetaClassHelper.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/runtime/MetaClassHelper.java b/src/main/org/codehaus/groovy/runtime/MetaClassHelper.java
index 70dfcf9..dcc694e 100644
--- a/src/main/org/codehaus/groovy/runtime/MetaClassHelper.java
+++ b/src/main/org/codehaus/groovy/runtime/MetaClassHelper.java
@@ -429,14 +429,14 @@ public class MetaClassHelper {
             CachedClass baseType = parameters[noVargsLength]; // case C
             if (!parameters[noVargsLength].isAssignableFrom(arguments[noVargsLength])) {
                 baseType = ReflectionCache.getCachedClass(baseType.getTheClass().getComponentType());
// case D
-                ret += 2l << VARGS_SHIFT; // penalty for vargs
+                ret += 2L << VARGS_SHIFT; // penalty for vargs
             }
             ret += calculateParameterDistance(arguments[noVargsLength], baseType);
         } else if (arguments.length > parameters.length) {
             // case B
             // we give our a vargs penalty for each exceeding argument and iterate
             // by using parameters[noVargsLength].getComponentType()
-            ret += (2l + arguments.length - parameters.length) << VARGS_SHIFT; // penalty
for vargs
+            ret += (2L + arguments.length - parameters.length) << VARGS_SHIFT; // penalty
for vargs
             CachedClass vargsType = ReflectionCache.getCachedClass(parameters[noVargsLength].getTheClass().getComponentType());
             for (int i = noVargsLength; i < arguments.length; i++) {
                 ret += calculateParameterDistance(arguments[i], vargsType);
@@ -445,7 +445,7 @@ public class MetaClassHelper {
             // case A
             // we give a penalty for vargs, since we have no direct
             // match for the last argument
-            ret += 1l << VARGS_SHIFT;
+            ret += 1L << VARGS_SHIFT;
         }
 
         return ret;


Mime
View raw message