groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject groovy git commit: Remove useless code
Date Sun, 22 Jan 2017 05:59:55 GMT
Repository: groovy
Updated Branches:
  refs/heads/parrot 75d920b0a -> ac5308758


Remove useless code


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

Branch: refs/heads/parrot
Commit: ac5308758352140b0ab0783028c058e7fa9ee873
Parents: 75d920b
Author: sunlan <sunlan@apache.org>
Authored: Sun Jan 22 13:59:45 2017 +0800
Committer: sunlan <sunlan@apache.org>
Committed: Sun Jan 22 13:59:45 2017 +0800

----------------------------------------------------------------------
 .../org/apache/groovy/parser/antlr4/AstBuilder.java    | 13 -------------
 1 file changed, 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/ac530875/subprojects/groovy-parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
----------------------------------------------------------------------
diff --git a/subprojects/groovy-parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
b/subprojects/groovy-parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
index fa75abf..870a349 100644
--- a/subprojects/groovy-parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
+++ b/subprojects/groovy-parser-antlr4/src/main/java/org/apache/groovy/parser/antlr4/AstBuilder.java
@@ -270,9 +270,6 @@ public class AstBuilder extends GroovyParserBaseVisitor<Object>
implements Groov
 
     @Override
     public ImportNode visitImportDeclaration(ImportDeclarationContext ctx) {
-        // GROOVY-6094
-        moduleNode.putNodeMetaData(IMPORT_NODE_CLASS, IMPORT_NODE_CLASS);
-
         ImportNode importNode;
 
         boolean hasStatic = asBoolean(ctx.STATIC());
@@ -329,15 +326,6 @@ public class AstBuilder extends GroovyParserBaseVisitor<Object>
implements Groov
             }
         }
 
-        // TODO verify whether the following code is useful or not
-        // we're using node metadata here in order to fix GROOVY-6094
-        // without breaking external APIs
-        Object node = moduleNode.getNodeMetaData(IMPORT_NODE_CLASS);
-        if (null != node && IMPORT_NODE_CLASS != node) {
-            this.configureAST((ImportNode) node, importNode);
-        }
-        moduleNode.removeNodeMetaData(IMPORT_NODE_CLASS);
-
         return this.configureAST(importNode, ctx);
     }
 
@@ -4398,7 +4386,6 @@ public class AstBuilder extends GroovyParserBaseVisitor<Object>
implements Groov
     private final Deque<ClassNode> classNodeStack = new ArrayDeque<>();
     private final Deque<List<InnerClassNode>> anonymousInnerClassesDefinedInMethodStack
= new ArrayDeque<>();
     private int anonymousInnerClassCounter = 1;
-    private static final Class<ImportNode> IMPORT_NODE_CLASS = ImportNode.class;
     private static final String QUESTION_STR = "?";
     private static final String DOT_STR = ".";
     private static final String SUB_STR = "-";


Mime
View raw message