Browse Source

Merge branch '6.1.x'

pull/33883/head
Juergen Hoeller 1 year ago
parent
commit
1c2dbec971
  1. 5
      spring-core/src/main/java/org/springframework/util/unit/DataSize.java
  2. 3
      spring-core/src/main/java/org/springframework/util/unit/DataUnit.java

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

@ -25,9 +25,8 @@ import org.springframework.util.Assert; @@ -25,9 +25,8 @@ import org.springframework.util.Assert;
import org.springframework.util.StringUtils;
/**
* A data size, such as '12MB'.
*
* <p>This class models data size in terms of bytes and is immutable and thread-safe.
* A data size, such as '12MB'. This class models data size in terms of
* bytes and is immutable and thread-safe.
*
* <p>The terms and units used in this class are based on
* <a href="https://en.wikipedia.org/wiki/Binary_prefix">binary prefixes</a>

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

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2024 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.
@ -81,6 +81,7 @@ public enum DataUnit { @@ -81,6 +81,7 @@ public enum DataUnit {
return this.size;
}
/**
* Return the {@link DataUnit} matching the specified {@code suffix}.
* @param suffix one of the standard suffixes

Loading…
Cancel
Save