Skip to content

Commit 81d5e66

Browse files
committed
Make DataSize serializable
Closes gh-25676
1 parent b95edb5 commit 81d5e66

File tree

1 file changed

+4
-2
lines changed
  • spring-core/src/main/java/org/springframework/util/unit

1 file changed

+4
-2
lines changed

spring-core/src/main/java/org/springframework/util/unit/DataSize.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
1616

1717
package org.springframework.util.unit;
1818

19+
import java.io.Serializable;
1920
import java.util.regex.Matcher;
2021
import java.util.regex.Pattern;
2122

@@ -31,7 +32,8 @@
3132
* @author Stephane Nicoll
3233
* @since 5.1
3334
*/
34-
public final class DataSize implements Comparable<DataSize> {
35+
@SuppressWarnings("serial")
36+
public final class DataSize implements Comparable<DataSize>, Serializable {
3537

3638
/**
3739
* The pattern for parsing.

0 commit comments

Comments
 (0)