From af05850485c6075697bbe0438b257e462bf73169 Mon Sep 17 00:00:00 2001 From: Thomas Wolf Date: Mon, 27 Jan 2020 17:01:27 +0100 Subject: [PATCH] FS: re-order fields and use all uppercase for true constants Change-Id: I49fb77d6a12ae9083b5bf5779dc74a3dc49d7594 Signed-off-by: Thomas Wolf --- .../src/org/eclipse/jgit/util/FS.java | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java index 91734a0c2..415631805 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/FS.java @@ -204,20 +204,7 @@ public final static class FileStoreAttributes { public static final FileStoreAttributes FALLBACK_FILESTORE_ATTRIBUTES = new FileStoreAttributes( FALLBACK_TIMESTAMP_RESOLUTION); - private static final Map attributeCache = new ConcurrentHashMap<>(); - - private static final SimpleLruCache attrCacheByPath = new SimpleLruCache<>( - 100, 0.2f); - - private static AtomicBoolean background = new AtomicBoolean(); - - private static Map locks = new ConcurrentHashMap<>(); - - private static void setBackground(boolean async) { - background.set(async); - } - - private static final String javaVersionPrefix = SystemReader + private static final String JAVA_VERSION_PREFIX = SystemReader .getInstance().getHostname() + '|' + System.getProperty("java.vendor") + '|' //$NON-NLS-1$ + System.getProperty("java.version") + '|'; //$NON-NLS-1$ @@ -225,6 +212,15 @@ private static void setBackground(boolean async) { private static final Duration FALLBACK_MIN_RACY_INTERVAL = Duration .ofMillis(10); + private static final Map attributeCache = new ConcurrentHashMap<>(); + + private static final SimpleLruCache attrCacheByPath = new SimpleLruCache<>( + 100, 0.2f); + + private static final AtomicBoolean background = new AtomicBoolean(); + + private static final Map locks = new ConcurrentHashMap<>(); + private static final AtomicInteger threadNumber = new AtomicInteger(1); /** @@ -250,6 +246,10 @@ private static void setBackground(boolean async) { return t; }); + private static void setBackground(boolean async) { + background.set(async); + } + /** * Configures size and purge factor of the path-based cache for file * system attributes. Caching of file system attributes avoids recurring @@ -628,7 +628,7 @@ private static String getConfigKey(FileStore s) { } else { storeKey = s.name(); } - return javaVersionPrefix + storeKey; + return JAVA_VERSION_PREFIX + storeKey; } private static TimeUnit getUnit(long nanos) {