You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2019/02/11 17:13:57 UTC
[groovy] branch GROOVY_2_5_X updated: Avoid potential NPE
This is an automated email from the ASF dual-hosted git repository.
sunlan pushed a commit to branch GROOVY_2_5_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_2_5_X by this push:
new ffe56e1 Avoid potential NPE
ffe56e1 is described below
commit ffe56e122864e35eef677cd6f8fc52e056117383
Author: Daniel Sun <su...@apache.org>
AuthorDate: Tue Feb 12 01:02:30 2019 +0800
Avoid potential NPE
(cherry picked from commit 84a2fd1f9983aeaedea38c38365a907d18d6bf84)
---
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 6e7eb70..69ec6c8 100644
--- a/src/main/java/org/codehaus/groovy/control/ResolveVisitor.java
+++ b/src/main/java/org/codehaus/groovy/control/ResolveVisitor.java
@@ -1607,7 +1607,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));
}
}