Repository: groovy Updated Branches: refs/heads/master d02c15545 -> fa3c2719c
revert Making EmptyStatement singleton Project: http://git-wip-us.apache.org/repos/asf/groovy/repo Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/fa3c2719 Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/fa3c2719 Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/fa3c2719 Branch: refs/heads/master Commit: fa3c2719c594ca7710e976dd5330a2e442713551 Parents: d02c155 Author: sunlan <[email protected]> Authored: Sat Jun 24 21:30:29 2017 +0800 Committer: sunlan <[email protected]> Committed: Sat Jun 24 21:30:29 2017 +0800 ---------------------------------------------------------------------- src/main/org/codehaus/groovy/ast/stmt/EmptyStatement.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/groovy/blob/fa3c2719/src/main/org/codehaus/groovy/ast/stmt/EmptyStatement.java ---------------------------------------------------------------------- diff --git a/src/main/org/codehaus/groovy/ast/stmt/EmptyStatement.java b/src/main/org/codehaus/groovy/ast/stmt/EmptyStatement.java index fa23659..3823eb8 100644 --- a/src/main/org/codehaus/groovy/ast/stmt/EmptyStatement.java +++ b/src/main/org/codehaus/groovy/ast/stmt/EmptyStatement.java @@ -33,7 +33,14 @@ import java.util.Map; public class EmptyStatement extends Statement { public static final EmptyStatement INSTANCE = new EmptyStatement(); - private EmptyStatement() {} + /** + * use EmptyStatement.INSTANCE instead + */ + @Deprecated + public EmptyStatement() { + // org.spockframework.compiler.ConditionRewriter will create EmptyStatement via calling the constructor + // so we keep the constructor for the time being, but it will be removed finally. + } public void visit(GroovyCodeVisitor visitor) { }
