Repository: groovy
Updated Branches:
  refs/heads/master 667e134ca -> b90c0b69c


GROOVY-7855: NullPointerException in GenericsTypeMatcher


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

Branch: refs/heads/master
Commit: b90c0b69c78f6b2869c7947fc964c184610c1de8
Parents: 667e134
Author: paulk <pa...@asert.com.au>
Authored: Tue Jun 14 23:14:31 2016 +1000
Committer: paulk <pa...@asert.com.au>
Committed: Tue Jun 14 23:14:31 2016 +1000

----------------------------------------------------------------------
 src/main/org/codehaus/groovy/ast/GenericsType.java | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/b90c0b69/src/main/org/codehaus/groovy/ast/GenericsType.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/ast/GenericsType.java 
b/src/main/org/codehaus/groovy/ast/GenericsType.java
index 51e10c5..3494b33 100644
--- a/src/main/org/codehaus/groovy/ast/GenericsType.java
+++ b/src/main/org/codehaus/groovy/ast/GenericsType.java
@@ -441,17 +441,15 @@ public class GenericsType extends ASTNode {
                                                         gt = 
classNodePlaceholders.get(gt.getName());
                                                     }
                                                 }
-                                                match = match &&
-                                                        
(implementsInterfaceOrIsSubclassOf(classNodeType.getType(), gt.getType())
-                                                         || 
classNodeType.isCompatibleWith(gt.getType())); // workaround for GROOVY-6095
+                                                match = 
implementsInterfaceOrIsSubclassOf(classNodeType.getType(), gt.getType())
+                                                         || 
classNodeType.isCompatibleWith(gt.getType()); // workaround for GROOVY-6095
                                                 if (!match) break;
                                             }
                                         }
                                         return match;
-                                    } else {
+                                    } else if 
(classNodePlaceholders.containsKey(name)) {
                                         redirectBoundType = 
classNodePlaceholders.get(name);
                                     }
-
                                 }
                             }
                             match = 
redirectBoundType.isCompatibleWith(classNodeType.getType());

Reply via email to