11/*
2- * Copyright 2002-2023 the original author or authors.
2+ * Copyright 2002-2024 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.
2525import org .springframework .util .StringUtils ;
2626
2727/**
28- * A data size, such as '12MB'.
29- *
30- * <p>This class models data size in terms of bytes and is immutable and thread-safe.
28+ * A data size, such as '12MB'. This class models data size in terms of
29+ * bytes and is immutable and thread-safe.
3130 *
3231 * <p>The terms and units used in this class are based on
3332 * <a href="https://en.wikipedia.org/wiki/Binary_prefix">binary prefixes</a>
@@ -247,14 +246,14 @@ public String toString() {
247246
248247
249248 @ Override
250- public boolean equals (@ Nullable Object obj ) {
251- if (this == obj ) {
249+ public boolean equals (@ Nullable Object other ) {
250+ if (this == other ) {
252251 return true ;
253252 }
254- if (obj == null || getClass () != obj .getClass ()) {
253+ if (other == null || getClass () != other .getClass ()) {
255254 return false ;
256255 }
257- DataSize that = (DataSize ) obj ;
256+ DataSize that = (DataSize ) other ;
258257 return (this .bytes == that .bytes );
259258 }
260259
@@ -279,7 +278,6 @@ private static DataUnit determineDataUnit(String suffix, @Nullable DataUnit defa
279278 DataUnit defaultUnitToUse = (defaultUnit != null ? defaultUnit : DataUnit .BYTES );
280279 return (StringUtils .hasLength (suffix ) ? DataUnit .fromSuffix (suffix ) : defaultUnitToUse );
281280 }
282-
283281 }
284282
285283}
0 commit comments