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 16:27:17 UTC
[groovy] branch GROOVY_4_0_X updated: target class name fix
This is an automated email from the ASF dual-hosted git repository.
emilles pushed a commit to branch GROOVY_4_0_X
in repository https://gitbox.apache.org/repos/asf/groovy.git
The following commit(s) were added to refs/heads/GROOVY_4_0_X by this push:
new 7036c7a2d2 target class name fix
7036c7a2d2 is described below
commit 7036c7a2d2c14ba7c9b6609fe0d8cd9b0c508583
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))
}