diff options
Diffstat (limited to 'sonar-home')
-rw-r--r-- | sonar-home/src/main/java/org/sonar/home/cache/PersistentCache.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sonar-home/src/main/java/org/sonar/home/cache/PersistentCache.java b/sonar-home/src/main/java/org/sonar/home/cache/PersistentCache.java index 918f2b1a147..2193f5a1ba4 100644 --- a/sonar-home/src/main/java/org/sonar/home/cache/PersistentCache.java +++ b/sonar-home/src/main/java/org/sonar/home/cache/PersistentCache.java @@ -46,12 +46,11 @@ public class PersistentCache { private static final String DIGEST_ALGO = "MD5"; private static final String LOCK_FNAME = ".lock"; - private Path baseDir; - // eviction strategy is to expire entries after modification once a time duration has elapsed private final long defaultDurationToExpireMs; private final Logger logger; private final String version; + private final Path baseDir; public PersistentCache(Path baseDir, long defaultDurationToExpireMs, Logger logger, String version) { this.baseDir = baseDir; @@ -63,7 +62,7 @@ public class PersistentCache { logger.debug("cache: " + baseDir + ", default expiration time (ms): " + defaultDurationToExpireMs); } - public void reconfigure() { + public synchronized void reconfigure() { try { Files.createDirectories(baseDir); } catch (IOException e) { |