Make DataSize serializable

Closes gh-25676
This commit is contained in:
Stephane Nicoll
2020-09-02 14:45:32 +02:00
parent b95edb549b
commit 81d5e66fe7

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,6 +16,7 @@
package org.springframework.util.unit;
import java.io.Serializable;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -31,7 +32,8 @@ import org.springframework.util.StringUtils;
* @author Stephane Nicoll
* @since 5.1
*/
public final class DataSize implements Comparable<DataSize> {
@SuppressWarnings("serial")
public final class DataSize implements Comparable<DataSize>, Serializable {
/**
* The pattern for parsing.