groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject groovy git commit: Trivial refactoring: simplify `checkInnerTypeVisibility`
Date Sat, 11 Aug 2018 17:36:02 GMT
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_5_X dd988bf40 -> 161d1b5ff


Trivial refactoring: simplify `checkInnerTypeVisibility`


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

Branch: refs/heads/GROOVY_2_5_X
Commit: 161d1b5fff1db89bf2b0a10c7484751ac55a4e0c
Parents: dd988bf
Author: Daniel Sun <sunlan@apache.org>
Authored: Sun Aug 12 01:35:52 2018 +0800
Committer: Daniel Sun <sunlan@apache.org>
Committed: Sun Aug 12 01:35:52 2018 +0800

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


http://git-wip-us.apache.org/repos/asf/groovy/blob/161d1b5f/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 b5f108f..20adb0f 100644
--- a/src/main/java/org/codehaus/groovy/control/ResolveVisitor.java
+++ b/src/main/java/org/codehaus/groovy/control/ResolveVisitor.java
@@ -331,11 +331,7 @@ public class ResolveVisitor extends ClassCodeExpressionTransformer {
         }
 
         int modifiers = innerClassNode.getModifiers();
-        if (Modifier.isPublic(modifiers) || Modifier.isProtected(modifiers)) {
-            return true;
-        }
-
-        return false;
+        return Modifier.isPublic(modifiers) || Modifier.isProtected(modifiers);
     }
 
     private void resolveOrFail(ClassNode type, String msg, ASTNode node) {


Mime
View raw message