groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject groovy git commit: Fix failing test: "Groovy6841Bug.testShouldNotThrowNPEduringCompilation" on 2_4_X
Date Thu, 05 Apr 2018 19:08:23 GMT
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_6_X a313e9fed -> 2b07b33a5


Fix failing test: "Groovy6841Bug.testShouldNotThrowNPEduringCompilation" on 2_4_X

(cherry picked from commit 742770d)


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

Branch: refs/heads/GROOVY_2_6_X
Commit: 2b07b33a588bc2aeed2cbe04a159a8b60c09e024
Parents: a313e9f
Author: danielsun1106 <realbluesun@hotmail.com>
Authored: Fri Apr 6 02:43:01 2018 +0800
Committer: danielsun1106 <realbluesun@hotmail.com>
Committed: Fri Apr 6 03:08:19 2018 +0800

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


http://git-wip-us.apache.org/repos/asf/groovy/blob/2b07b33a/src/main/java/org/codehaus/groovy/control/ResolveVisitor.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/control/ResolveVisitor.java b/src/main/java/org/codehaus/groovy/control/ResolveVisitor.java
index 6cfd9be..43a1dc1 100644
--- a/src/main/java/org/codehaus/groovy/control/ResolveVisitor.java
+++ b/src/main/java/org/codehaus/groovy/control/ResolveVisitor.java
@@ -290,7 +290,7 @@ public class ResolveVisitor extends ClassCodeExpressionTransformer {
 
     private boolean resolveToNestedOfCurrentClassAndSuperClasses(ClassNode type) {
         // GROOVY-8531: Fail to resolve type defined in super class written in Java
-        for (ClassNode enclosingClassNode = currentClass; ClassHelper.OBJECT_TYPE != enclosingClassNode;
enclosingClassNode = enclosingClassNode.getSuperClass()) {
+        for (ClassNode enclosingClassNode = currentClass; ClassHelper.OBJECT_TYPE != enclosingClassNode
&& null != enclosingClassNode; enclosingClassNode = enclosingClassNode.getSuperClass())
{
             if(resolveToNested(enclosingClassNode, type)) return true;
         }
 


Mime
View raw message