Browse Source

Make DataSize serializable

Closes gh-25676
pull/23967/head
Stephane Nicoll 5 years ago
parent
commit
81d5e66fe7
  1. 6
      spring-core/src/main/java/org/springframework/util/unit/DataSize.java

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

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

Loading…
Cancel
Save