Make DataSize constants final

This commit is contained in:
Sam Brannen
2019-09-24 15:32:26 +02:00
parent 30e1257dda
commit e6678f40e8

View File

@@ -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> {
/**
* 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;