You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@groovy.apache.org by su...@apache.org on 2019/12/24 00:03:52 UTC

[groovy] branch master updated: GROOVY-9351: Make `NumberRange` serializable to align with `IntRange` (#1128)

This is an automated email from the ASF dual-hosted git repository.

sunlan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new a9838e2  GROOVY-9351: Make `NumberRange` serializable to align with `IntRange` (#1128)
a9838e2 is described below

commit a9838e239a3682dd58dc03fa3ea115b1c31df6ca
Author: Daniel.Sun <su...@apache.org>
AuthorDate: Tue Dec 24 08:03:41 2019 +0800

    GROOVY-9351: Make `NumberRange` serializable to align with `IntRange` (#1128)
---
 src/main/java/groovy/lang/NumberRange.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main/java/groovy/lang/NumberRange.java b/src/main/java/groovy/lang/NumberRange.java
index 92d6552..3e1c6e3 100644
--- a/src/main/java/groovy/lang/NumberRange.java
+++ b/src/main/java/groovy/lang/NumberRange.java
@@ -21,6 +21,7 @@ package groovy.lang;
 import org.codehaus.groovy.runtime.InvokerHelper;
 import org.codehaus.groovy.runtime.IteratorClosureAdapter;
 
+import java.io.Serializable;
 import java.math.BigDecimal;
 import java.math.BigInteger;
 import java.util.AbstractList;
@@ -48,8 +49,9 @@ import static org.codehaus.groovy.runtime.dgmimpl.NumberNumberPlus.plus;
  *
  * @since 2.5.0
  */
-public class NumberRange extends AbstractList<Comparable> implements Range<Comparable> {
+public class NumberRange extends AbstractList<Comparable> implements Range<Comparable>, Serializable {
 
+    private static final long serialVersionUID = 5107424833653948484L;
     /**
      * The first value in the range.
      */