Skip to content

Commit 51f9294

Browse files
committed
GROOVY-8242: @newify default attribute value (closes groovy#579)
Class values are only required for Python-style conversions so the attribute should default to an empty array to indicate it is not strictly required.
1 parent faf1ece commit 51f9294

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/groovy/lang/Newify.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
/**
2929
* Annotation that supports writing constructor call expressions without the 'new'
3030
* keyword. Instead they can be written "Ruby-style" as a method call to a 'new'
31-
* method or "Python-style" by just omitting the keyword missing.
31+
* method or "Python-style" by just omitting the 'new' keyword.
3232
* <p>
3333
* It allows you to write code snippets like this ("Python-style"):
3434
* <pre>
@@ -100,7 +100,7 @@
100100
@Target({ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.TYPE, ElementType.FIELD, ElementType.LOCAL_VARIABLE})
101101
@GroovyASTTransformationClass("org.codehaus.groovy.transform.NewifyASTTransformation")
102102
public @interface Newify {
103-
Class[] value();
103+
Class<?>[] value() default {};
104104

105105
/**
106106
* @return if automatic conversion of "Ruby-style" new method calls should occur

0 commit comments

Comments
 (0)