You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by em...@apache.org on 2022/06/14 15:57:57 UTC

[groovy] branch master updated: target class name fix

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

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


The following commit(s) were added to refs/heads/master by this push:
     new fcc2ae10d0 target class name fix
fcc2ae10d0 is described below

commit fcc2ae10d011c9f66af2438d0107f5b258332490
Author: Eric Milles <er...@thomsonreuters.com>
AuthorDate: Tue Jun 14 10:57:43 2022 -0500

    target class name fix
---
 .../codehaus/groovy/ast/builder/AstSpecificationCompiler.groovy   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/main/groovy/org/codehaus/groovy/ast/builder/AstSpecificationCompiler.groovy b/src/main/groovy/org/codehaus/groovy/ast/builder/AstSpecificationCompiler.groovy
index fb60d81efd..b8b1301434 100644
--- a/src/main/groovy/org/codehaus/groovy/ast/builder/AstSpecificationCompiler.groovy
+++ b/src/main/groovy/org/codehaus/groovy/ast/builder/AstSpecificationCompiler.groovy
@@ -167,7 +167,7 @@ class AstSpecificationCompiler implements GroovyInterceptable {
      */
     @CompileStatic
     private void captureAndCreateNode(String name, @DelegatesTo(AstSpecificationCompiler) Closure argBlock,
-            @ClosureParams(value=FromString, options="java.util.List<org.codehaus.groovy.ast.ASTNode>") Closure ctorBlock) {
+            @ClosureParams(value=FromString, options='java.util.List<org.codehaus.groovy.ast.ASTNode>') Closure ctorBlock) {
         if (!argBlock) throw new IllegalArgumentException("nodes of type $name require arguments to be specified")
 
         def oldProps = new ArrayList<>(expression)
@@ -192,7 +192,7 @@ class AstSpecificationCompiler implements GroovyInterceptable {
      *       the single closure argument used during invocation
      */
     private void makeNode(Class target, String typeAlias, List<Class<? super ASTNode>> ctorArgs, @DelegatesTo(AstSpecificationCompiler) Closure argBlock) {
-        captureAndCreateNode(target.class.simpleName, argBlock) {
+        captureAndCreateNode(target.simpleName, argBlock) {
             target.newInstance(*enforceConstraints(typeAlias, ctorArgs))
         }
     }
@@ -256,14 +256,14 @@ class AstSpecificationCompiler implements GroovyInterceptable {
      *       a type parameter
      */
     private void makeNodeWithClassParameter(Class target, String alias, List<Class> spec, @DelegatesTo(AstSpecificationCompiler) Closure argBlock, Class type) {
-        captureAndCreateNode(target.class.simpleName, argBlock) {
+        captureAndCreateNode(target.simpleName, argBlock) {
             expression.add(0, ClassHelper.make(type))
             target.newInstance(*enforceConstraints(alias, spec))
         }
     }
 
     private void makeNodeWithStringParameter(Class target, String alias, List<Class> spec, @DelegatesTo(AstSpecificationCompiler) Closure argBlock, String text) {
-        captureAndCreateNode(target.class.simpleName, argBlock) {
+        captureAndCreateNode(target.simpleName, argBlock) {
             expression.add(0, text)
             target.newInstance(*enforceConstraints(alias, spec))
         }