GROOVY-8242: @Newify default attribute value (closes #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.


Project: http://git-wip-us.apache.org/repos/asf/groovy/repo
Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/8bc155b5
Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/8bc155b5
Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/8bc155b5

Branch: refs/heads/GROOVY_2_6_X
Commit: 8bc155b5ce3169696d02e652cffcf28fbad9c3a3
Parents: 7ffde72
Author: John Wagenleitner <jwagenleit...@apache.org>
Authored: Sat Aug 5 11:05:17 2017 -0700
Committer: John Wagenleitner <jwagenleit...@apache.org>
Committed: Sat Aug 5 21:03:26 2017 -0700

----------------------------------------------------------------------
 src/main/groovy/lang/Newify.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/8bc155b5/src/main/groovy/lang/Newify.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/lang/Newify.java b/src/main/groovy/lang/Newify.java
index 66edcde..5bf7fdf 100644
--- a/src/main/groovy/lang/Newify.java
+++ b/src/main/groovy/lang/Newify.java
@@ -28,7 +28,7 @@ import java.lang.annotation.Target;
 /**
  * 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>
@@ -100,7 +100,7 @@ import java.lang.annotation.Target;
 @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

Reply via email to