You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by pa...@apache.org on 2017/02/16 03:27:34 UTC

groovy git commit: GROOVY-8088: For @MapConstructor and @TupleConstructor we should provide a default undefined value for better Java compatibility (closes #498)

Repository: groovy
Updated Branches:
  refs/heads/master cf8686a4c -> 3590d77c5


GROOVY-8088: For @MapConstructor and @TupleConstructor we should provide a default undefined value for better Java compatibility (closes #498)


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

Branch: refs/heads/master
Commit: 3590d77c5c2771e6acfcbd4235b836198d7d105e
Parents: cf8686a
Author: paulk <pa...@asert.com.au>
Authored: Wed Feb 15 17:28:30 2017 +1000
Committer: paulk <pa...@asert.com.au>
Committed: Thu Feb 16 13:26:13 2017 +1000

----------------------------------------------------------------------
 src/main/groovy/transform/MapConstructor.java   | 4 ++--
 src/main/groovy/transform/TupleConstructor.java | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/3590d77c/src/main/groovy/transform/MapConstructor.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/transform/MapConstructor.java b/src/main/groovy/transform/MapConstructor.java
index 38437e2..5608001 100644
--- a/src/main/groovy/transform/MapConstructor.java
+++ b/src/main/groovy/transform/MapConstructor.java
@@ -114,12 +114,12 @@ public @interface MapConstructor {
     /**
      * A Closure containing statements which will be prepended to the generated constructor. The first statement within the Closure may be "super(someArgs)" in which case the no-arg super constructor won't be called.
      */
-    Class pre();
+    Class pre() default Undefined.CLASS.class;
 
     /**
      * A Closure containing statements which will be appended to the end of the generated constructor. Useful for validation steps or tweaking the populated fields/properties.
      */
-    Class post();
+    Class post() default Undefined.CLASS.class;
 
     /**
      * Whether to include all fields and/or properties within the constructor, including those with names that are considered internal.

http://git-wip-us.apache.org/repos/asf/groovy/blob/3590d77c/src/main/groovy/transform/TupleConstructor.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/transform/TupleConstructor.java b/src/main/groovy/transform/TupleConstructor.java
index 1a3cca5..89d0eb7 100644
--- a/src/main/groovy/transform/TupleConstructor.java
+++ b/src/main/groovy/transform/TupleConstructor.java
@@ -267,12 +267,12 @@ public @interface TupleConstructor {
      *
      * @since 2.5.0
      */
-    Class pre();
+    Class pre() default Undefined.CLASS.class;
 
     /**
      * A Closure containing statements which will be appended to the end of the generated constructor. Useful for validation steps or tweaking the populated fields/properties.
      *
      * @since 2.5.0
      */
-    Class post();
+    Class post() default Undefined.CLASS.class;
 }