diff --git a/src/java/org/apache/commons/lang3/Range.java b/src/java/org/apache/commons/lang3/Range.java index 69d3fc78a..dc4fa1c62 100644 --- a/src/java/org/apache/commons/lang3/Range.java +++ b/src/java/org/apache/commons/lang3/Range.java @@ -328,7 +328,9 @@ public class Range implements Serializable { // Taken from Commons Collections - documentation removed as not a public class - private static class ComparableComparator> implements Comparator { + private static class ComparableComparator> implements Comparator, Serializable { + + private static final long serialVersionUID = 1L; @SuppressWarnings("unchecked") public static final ComparableComparator INSTANCE = new ComparableComparator(); diff --git a/src/test/org/apache/commons/lang3/RangeTest.java b/src/test/org/apache/commons/lang3/RangeTest.java index 1e0afa4f7..1cf67385d 100644 --- a/src/test/org/apache/commons/lang3/RangeTest.java +++ b/src/test/org/apache/commons/lang3/RangeTest.java @@ -269,4 +269,8 @@ public class RangeTest extends TestCase { } + public void testSerializing() { + SerializationUtils.clone(intRange); + } + }