mirror of
https://github.com/mitb-archive/filebot
synced 2024-12-24 16:58:51 -05:00
* make sure long/int overflow issues are resolved
This commit is contained in:
parent
9eee85909b
commit
5fc9a342a1
@ -12,9 +12,11 @@ import net.sf.ehcache.Element;
|
||||
|
||||
public abstract class AbstractCachedResource<R, T extends Serializable> {
|
||||
|
||||
public static final long ONE_MONTH = 30 * 24 * 60 * 60 * 1000L;
|
||||
public static final long ONE_WEEK = 7 * 24 * 60 * 60 * 1000L;
|
||||
public static final long ONE_DAY = 24 * 60 * 60 * 1000L;
|
||||
public static final long ONE_MINUTE = 60 * 1000;
|
||||
public static final long ONE_HOUR = 60 * ONE_MINUTE;
|
||||
public static final long ONE_DAY = 24 * ONE_HOUR;
|
||||
public static final long ONE_WEEK = 7 * ONE_DAY;
|
||||
public static final long ONE_MONTH = 30 * ONE_DAY;
|
||||
|
||||
private String resource;
|
||||
private Class<T> type;
|
||||
|
@ -536,8 +536,8 @@ public final class FileUtilities {
|
||||
}
|
||||
|
||||
public static final long KILO = 1024;
|
||||
public static final long MEGA = KILO * 1024;
|
||||
public static final long GIGA = MEGA * 1024;
|
||||
public static final long MEGA = 1024 * KILO;
|
||||
public static final long GIGA = 1024 * MEGA;
|
||||
|
||||
public static String formatSize(long size) {
|
||||
if (size >= MEGA)
|
||||
|
Loading…
Reference in New Issue
Block a user