Browse Source

Make DataSize constants final

pull/23690/head
Sam Brannen 6 years ago
parent
commit
e6678f40e8
  1. 10
      spring-core/src/main/java/org/springframework/util/unit/DataSize.java

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

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2019 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.
@ -41,22 +41,22 @@ public final class DataSize implements Comparable<DataSize> { @@ -41,22 +41,22 @@ public final class DataSize implements Comparable<DataSize> {
/**
* Bytes per Kilobyte.
*/
private static long BYTES_PER_KB = 1024;
private static final long BYTES_PER_KB = 1024;
/**
* Bytes per Megabyte.
*/
private static long BYTES_PER_MB = BYTES_PER_KB * 1024;
private static final long BYTES_PER_MB = BYTES_PER_KB * 1024;
/**
* Bytes per Gigabyte.
*/
private static long BYTES_PER_GB = BYTES_PER_MB * 1024;
private static final long BYTES_PER_GB = BYTES_PER_MB * 1024;
/**
* Bytes per Terabyte.
*/
private static long BYTES_PER_TB = BYTES_PER_GB * 1024;
private static final long BYTES_PER_TB = BYTES_PER_GB * 1024;
private final long bytes;

Loading…
Cancel
Save