groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject groovy git commit: Make tuples Serializable
Date Fri, 08 Dec 2017 02:35:39 GMT
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_6_X 6546b0b34 -> 172820ec8


Make tuples Serializable

(cherry picked from commit 2bb5458)


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

Branch: refs/heads/GROOVY_2_6_X
Commit: 172820ec80657bf0d4e2524cdbb461ed730ba37f
Parents: 6546b0b
Author: sunlan <sunlan@apache.org>
Authored: Fri Dec 8 10:07:15 2017 +0800
Committer: sunlan <sunlan@apache.org>
Committed: Fri Dec 8 10:35:30 2017 +0800

----------------------------------------------------------------------
 src/main/groovy/lang/Tuple.java  | 4 +++-
 src/main/groovy/lang/Tuple1.java | 1 +
 src/main/groovy/lang/Tuple2.java | 1 +
 src/main/groovy/lang/Tuple3.java | 1 +
 src/main/groovy/lang/Tuple4.java | 1 +
 src/main/groovy/lang/Tuple5.java | 1 +
 src/main/groovy/lang/Tuple6.java | 1 +
 src/main/groovy/lang/Tuple7.java | 1 +
 src/main/groovy/lang/Tuple8.java | 1 +
 src/main/groovy/lang/Tuple9.java | 1 +
 10 files changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/172820ec/src/main/groovy/lang/Tuple.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/lang/Tuple.java b/src/main/groovy/lang/Tuple.java
index aef53f6..036d13e 100644
--- a/src/main/groovy/lang/Tuple.java
+++ b/src/main/groovy/lang/Tuple.java
@@ -20,6 +20,7 @@ package groovy.lang;
 
 import org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation;
 
+import java.io.Serializable;
 import java.util.AbstractList;
 import java.util.List;
 import java.util.Objects;
@@ -29,7 +30,8 @@ import java.util.Objects;
  * 
  * @author <a href="mailto:james@coredevelopers.net">James Strachan</a>
  */
-public class Tuple<E> extends AbstractList<E> {
+public class Tuple<E> extends AbstractList<E> implements Serializable {
+    private static final long serialVersionUID = -6707770506387821031L;
     private final E[] contents;
 
     public Tuple(E... contents) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/172820ec/src/main/groovy/lang/Tuple1.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/lang/Tuple1.java b/src/main/groovy/lang/Tuple1.java
index 1506bb0..9b8d6bd 100644
--- a/src/main/groovy/lang/Tuple1.java
+++ b/src/main/groovy/lang/Tuple1.java
@@ -24,6 +24,7 @@ package groovy.lang;
  * @since 2.5.0
  */
 public class Tuple1<T1> extends Tuple {
+    private static final long serialVersionUID = -4647790147461409603L;
     private final T1 first;
 
     public Tuple1(T1 first) {

http://git-wip-us.apache.org/repos/asf/groovy/blob/172820ec/src/main/groovy/lang/Tuple2.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/lang/Tuple2.java b/src/main/groovy/lang/Tuple2.java
index d3a8be7..b096aee 100644
--- a/src/main/groovy/lang/Tuple2.java
+++ b/src/main/groovy/lang/Tuple2.java
@@ -22,6 +22,7 @@ package groovy.lang;
  * Represents a list of 2 typed Objects.
  */
 public class Tuple2<T1, T2> extends Tuple {
+    private static final long serialVersionUID = 9006144674906325597L;
     private final T1 first;
     private final T2 second;
 

http://git-wip-us.apache.org/repos/asf/groovy/blob/172820ec/src/main/groovy/lang/Tuple3.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/lang/Tuple3.java b/src/main/groovy/lang/Tuple3.java
index de539ec..b5fe7d9 100644
--- a/src/main/groovy/lang/Tuple3.java
+++ b/src/main/groovy/lang/Tuple3.java
@@ -25,6 +25,7 @@ package groovy.lang;
  * @since 2.5.0
  */
 public class Tuple3<T1, T2, T3> extends Tuple {
+    private static final long serialVersionUID = 8469774237154310687L;
     private final T1 first;
     private final T2 second;
     private final T3 third;

http://git-wip-us.apache.org/repos/asf/groovy/blob/172820ec/src/main/groovy/lang/Tuple4.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/lang/Tuple4.java b/src/main/groovy/lang/Tuple4.java
index 069f3af..04f414e 100644
--- a/src/main/groovy/lang/Tuple4.java
+++ b/src/main/groovy/lang/Tuple4.java
@@ -25,6 +25,7 @@ package groovy.lang;
  * @since 2.5.0
  */
 public class Tuple4<T1, T2, T3, T4> extends Tuple {
+    private static final long serialVersionUID = -7788878731471377207L;
     private final T1 first;
     private final T2 second;
     private final T3 third;

http://git-wip-us.apache.org/repos/asf/groovy/blob/172820ec/src/main/groovy/lang/Tuple5.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/lang/Tuple5.java b/src/main/groovy/lang/Tuple5.java
index ea61507..ee9c802 100644
--- a/src/main/groovy/lang/Tuple5.java
+++ b/src/main/groovy/lang/Tuple5.java
@@ -25,6 +25,7 @@ package groovy.lang;
  * @since 2.5.0
  */
 public class Tuple5<T1, T2, T3, T4, T5> extends Tuple {
+    private static final long serialVersionUID = 6722094358774027115L;
     private final T1 first;
     private final T2 second;
     private final T3 third;

http://git-wip-us.apache.org/repos/asf/groovy/blob/172820ec/src/main/groovy/lang/Tuple6.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/lang/Tuple6.java b/src/main/groovy/lang/Tuple6.java
index 6982aa2..76d12ca 100644
--- a/src/main/groovy/lang/Tuple6.java
+++ b/src/main/groovy/lang/Tuple6.java
@@ -25,6 +25,7 @@ package groovy.lang;
  * @since 2.5.0
  */
 public class Tuple6<T1, T2, T3, T4, T5, T6> extends Tuple {
+    private static final long serialVersionUID = -7848588473093102288L;
     private final T1 first;
     private final T2 second;
     private final T3 third;

http://git-wip-us.apache.org/repos/asf/groovy/blob/172820ec/src/main/groovy/lang/Tuple7.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/lang/Tuple7.java b/src/main/groovy/lang/Tuple7.java
index 126c215..05046e7 100644
--- a/src/main/groovy/lang/Tuple7.java
+++ b/src/main/groovy/lang/Tuple7.java
@@ -25,6 +25,7 @@ package groovy.lang;
  * @since 2.5.0
  */
 public class Tuple7<T1, T2, T3, T4, T5, T6, T7> extends Tuple {
+    private static final long serialVersionUID = 4226144828786865766L;
     private final T1 first;
     private final T2 second;
     private final T3 third;

http://git-wip-us.apache.org/repos/asf/groovy/blob/172820ec/src/main/groovy/lang/Tuple8.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/lang/Tuple8.java b/src/main/groovy/lang/Tuple8.java
index 1881213..1f38ca9 100644
--- a/src/main/groovy/lang/Tuple8.java
+++ b/src/main/groovy/lang/Tuple8.java
@@ -25,6 +25,7 @@ package groovy.lang;
  * @since 2.5.0
  */
 public class Tuple8<T1, T2, T3, T4, T5, T6, T7, T8> extends Tuple {
+    private static final long serialVersionUID = -8895822084644138566L;
     private final T1 first;
     private final T2 second;
     private final T3 third;

http://git-wip-us.apache.org/repos/asf/groovy/blob/172820ec/src/main/groovy/lang/Tuple9.java
----------------------------------------------------------------------
diff --git a/src/main/groovy/lang/Tuple9.java b/src/main/groovy/lang/Tuple9.java
index 7d48073..3189c10 100644
--- a/src/main/groovy/lang/Tuple9.java
+++ b/src/main/groovy/lang/Tuple9.java
@@ -26,6 +26,7 @@ package groovy.lang;
  * @since 2.5.0
  */
 public class Tuple9<T1, T2, T3, T4, T5, T6, T7, T8, T9> extends Tuple {
+    private static final long serialVersionUID = -5181196675351911769L;
     private final T1 first;
     private final T2 second;
     private final T3 third;


Mime
View raw message