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: extract method `applyCompilationCustomizers`
Date Sat, 06 Oct 2018 08:25:18 GMT
Repository: groovy
Updated Branches:
  refs/heads/master 886b1223c -> 517fad49d


Trivial refactoring: extract method `applyCompilationCustomizers`


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

Branch: refs/heads/master
Commit: 517fad49d87bd722ab36ce853535094a7551f0a3
Parents: 886b122
Author: Daniel Sun <sunlan@apache.org>
Authored: Sat Oct 6 16:25:10 2018 +0800
Committer: Daniel Sun <sunlan@apache.org>
Committed: Sat Oct 6 16:25:10 2018 +0800

----------------------------------------------------------------------
 .../java/org/codehaus/groovy/control/CompilationUnit.java   | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/517fad49/src/main/java/org/codehaus/groovy/control/CompilationUnit.java
----------------------------------------------------------------------
diff --git a/src/main/java/org/codehaus/groovy/control/CompilationUnit.java b/src/main/java/org/codehaus/groovy/control/CompilationUnit.java
index 4a4f0ff..91ca7ad 100644
--- a/src/main/java/org/codehaus/groovy/control/CompilationUnit.java
+++ b/src/main/java/org/codehaus/groovy/control/CompilationUnit.java
@@ -268,6 +268,13 @@ public class CompilationUnit extends ProcessingUnit {
             }
         }, Phases.INSTRUCTION_SELECTION);
 
+        applyCompilationCustomizers(configuration);
+
+        this.classgenCallback = null;
+        this.classNodeResolver = new ClassNodeResolver();
+    }
+
+    private void applyCompilationCustomizers(CompilerConfiguration configuration) {
         // apply configuration customizers if any
         if (configuration != null) {
             final List<CompilationCustomizer> customizers = configuration.getCompilationCustomizers();
@@ -278,8 +285,6 @@ public class CompilationUnit extends ProcessingUnit {
                 addPhaseOperation(customizer, customizer.getPhase().getPhaseNumber());
             }
         }
-        this.classgenCallback = null;
-        this.classNodeResolver = new ClassNodeResolver();
     }
 
     /**


Mime
View raw message