Skip to content

Commit c2363a6

Browse files
committed
Make DataSize serializable
Closes gh-25675
1 parent cdfdc34 commit c2363a6

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-2019 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

@@ -48,7 +49,8 @@
4849
* @since 5.1
4950
* @see DataUnit
5051
*/
51-
public final class DataSize implements Comparable<DataSize> {
52+
@SuppressWarnings("serial")
53+
public final class DataSize implements Comparable<DataSize>, Serializable {
5254

5355
/**
5456
* The pattern for parsing.

0 commit comments

Comments
 (0)