Bug 4436: Ensure serializability of TimeRangeImpl in GWT RPC

This commit is contained in:
Steffen Schaefer committed 2018-03-20 14:57:05 +01:00
1 parent b067d90412
commit a7a15aa5e6
2 files changed
+5 -2

No files matched your search

@@ -28,9 +28,8 @@ public class Util {
private transient int hashCode;
@SuppressWarnings("unused")
// required for some serialization frameworks such as GWT RPC
private Pair() {
protected Pair() {
}
public Pair(A a, B b) {
@@ -11,6 +11,10 @@ import com.sap.sse.common.Util;
public class TimeRangeImpl extends Util.Pair<TimePoint, TimePoint> implements TimeRange {
private static final long serialVersionUID = 8710198176227507300L;
// required for some serialization frameworks such as GWT RPC
protected TimeRangeImpl() {
}
public static TimeRange create(long fromMillis, long toMillisExclusive) {
return new TimeRangeImpl(new MillisecondsTimePoint(fromMillis), new MillisecondsTimePoint(toMillisExclusive));