Skip to content

Commit

Permalink
GROOVY-8242: @newify default attribute value (closes groovy#579)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jwagenleitner committed Aug 5, 2017
1 parent faf1ece commit 51f9294
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/groovy/lang/Newify.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
/**
* Annotation that supports writing constructor call expressions without the 'new'
* keyword. Instead they can be written "Ruby-style" as a method call to a 'new'
* method or "Python-style" by just omitting the keyword missing.
* method or "Python-style" by just omitting the 'new' keyword.
* <p>
* It allows you to write code snippets like this ("Python-style"):
* <pre>
Expand Down Expand Up @@ -100,7 +100,7 @@
@Target({ElementType.CONSTRUCTOR, ElementType.METHOD, ElementType.TYPE, ElementType.FIELD, ElementType.LOCAL_VARIABLE})
@GroovyASTTransformationClass("org.codehaus.groovy.transform.NewifyASTTransformation")
public @interface Newify {
Class[] value();
Class<?>[] value() default {};

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

0 comments on commit 51f9294

Please sign in to comment.