Repository: groovy
Updated Branches:
  refs/heads/master fc5a56fb5 -> c41a6dcc2


Trivial refactoring


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

Branch: refs/heads/master
Commit: c41a6dcc2b7523a5d156b23cb8e6542e8c726788
Parents: fc5a56f
Author: sunlan <[email protected]>
Authored: Mon Dec 4 08:38:07 2017 +0800
Committer: sunlan <[email protected]>
Committed: Mon Dec 4 08:38:07 2017 +0800

----------------------------------------------------------------------
 src/main/org/codehaus/groovy/runtime/CurriedClosure.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/c41a6dcc/src/main/org/codehaus/groovy/runtime/CurriedClosure.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/runtime/CurriedClosure.java 
b/src/main/org/codehaus/groovy/runtime/CurriedClosure.java
index 8700886..cabe230 100644
--- a/src/main/org/codehaus/groovy/runtime/CurriedClosure.java
+++ b/src/main/org/codehaus/groovy/runtime/CurriedClosure.java
@@ -155,7 +155,7 @@ public final class CurriedClosure<V> extends Closure<V> {
         if (isVararg()) {
             int numNonVarargs = oldParams.length - 1;
             if (index < 0) {
-                int absIndex = index < 0 ? -index : index;
+                int absIndex = -index;
                 // do -ve indexes based on actual args, so can't accurately 
calculate type here
                 // so work out minimal type params and vararg on end will 
allow for other possibilities
                 if (absIndex > numNonVarargs) gobbledParams = numNonVarargs;

Reply via email to