Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_4_X 064e8653c -> 8d044bbbe


GROOVY-8211: partial fix only on 2_4_X, avoid AIOOBE but don't do further 
checking


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

Branch: refs/heads/GROOVY_2_4_X
Commit: 8d044bbbe072b715a7f09fd809e2c7d628e47931
Parents: 064e865
Author: Paul King <pa...@asert.com.au>
Authored: Fri Apr 13 03:40:51 2018 +1000
Committer: Paul King <pa...@asert.com.au>
Committed: Fri Apr 13 03:40:51 2018 +1000

----------------------------------------------------------------------
 src/main/org/codehaus/groovy/ast/tools/GenericsUtils.java | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/8d044bbb/src/main/org/codehaus/groovy/ast/tools/GenericsUtils.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/ast/tools/GenericsUtils.java 
b/src/main/org/codehaus/groovy/ast/tools/GenericsUtils.java
index b980099..052a39f 100644
--- a/src/main/org/codehaus/groovy/ast/tools/GenericsUtils.java
+++ b/src/main/org/codehaus/groovy/ast/tools/GenericsUtils.java
@@ -52,9 +52,6 @@ import static 
org.codehaus.groovy.transform.stc.StaticTypeCheckingSupport.implem
 
 /**
  * Utility methods to deal with generic types.
- *
- * @author Cedric Champeau
- * @author Paul King
  */
 public class GenericsUtils {
     public static final GenericsType[] EMPTY_GENERICS_ARRAY = new 
GenericsType[0];
@@ -159,6 +156,7 @@ public class GenericsUtils {
         if (parameterized == null || parameterized.length == 0) return;
         GenericsType[] redirectGenericsTypes = 
node.redirect().getGenericsTypes();
         if (redirectGenericsTypes==null) redirectGenericsTypes = parameterized;
+        if (parameterized.length != redirectGenericsTypes.length) return;
         for (int i = 0; i < redirectGenericsTypes.length; i++) {
             GenericsType redirectType = redirectGenericsTypes[i];
             if (redirectType.isPlaceholder()) {

Reply via email to