This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new 84a2fd1  Avoid potential NPE
84a2fd1 is described below

commit 84a2fd1f9983aeaedea38c38365a907d18d6bf84
Author: Daniel Sun <sun...@apache.org>
AuthorDate: Tue Feb 12 01:02:30 2019 +0800

    Avoid potential NPE
---
 src/main/java/org/codehaus/groovy/control/ResolveVisitor.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/codehaus/groovy/control/ResolveVisitor.java 
b/src/main/java/org/codehaus/groovy/control/ResolveVisitor.java
index 02ca741..8b7560c 100644
--- a/src/main/java/org/codehaus/groovy/control/ResolveVisitor.java
+++ b/src/main/java/org/codehaus/groovy/control/ResolveVisitor.java
@@ -1634,7 +1634,7 @@ public class ResolveVisitor extends 
ClassCodeExpressionTransformer {
                         upperBoundsToResolve.add(new Tuple2<>(upperBound, 
classNode));
                     }
 
-                    if (upperBound.isUsingGenerics()) {
+                    if (upperBound != null && upperBound.isUsingGenerics()) {
                         upperBoundsWithGenerics.add(new Tuple2<>(upperBound, 
type));
                     }
                 }

Reply via email to