You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2019/09/27 01:50:44 UTC

[groovy] 02/02: don't use default compiler config

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

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

commit a835b25984d6891ce4e71ea3db4eef34d28d2907
Author: Paul King <pa...@asert.com.au>
AuthorDate: Fri Sep 27 11:50:29 2019 +1000

    don't use default compiler config
---
 src/main/java/org/codehaus/groovy/ast/tools/GenericsUtils.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/codehaus/groovy/ast/tools/GenericsUtils.java b/src/main/java/org/codehaus/groovy/ast/tools/GenericsUtils.java
index 4831a5d..8c75bf7 100644
--- a/src/main/java/org/codehaus/groovy/ast/tools/GenericsUtils.java
+++ b/src/main/java/org/codehaus/groovy/ast/tools/GenericsUtils.java
@@ -584,7 +584,7 @@ public class GenericsUtils {
 
         try {
             // for parsing just class names old and new parser should be the same but let's stick to the correct parser any way
-            boolean oldParserEnabled = CompilerConfiguration.DEFAULT.getPluginFactory() instanceof AntlrParserPluginFactory;
+            boolean oldParserEnabled = compilationUnit.getConfiguration().getPluginFactory() instanceof AntlrParserPluginFactory;
             ClassNode parsedNode = oldParserEnabled ?
                     Antlr2Utils.parse("DummyNode<" + option + ">") :
                     Antlr4Utils.parse("DummyNode<" + option + ">", compilationUnit.getConfiguration());