RepositoryCache: declare schedulerLock final
This fixes errorprone error [SynchronizeOnNonFinalField]: Synchronizing on non-final fields is not safe: if the field is ever updated, different threads may end up locking on different objects. Change-Id: I42fe5bde825151693e2da2d5b6cd6e1d34038dbc
This commit is contained in:
parent
d9143287b7
commit
74d5a1c172
|
@ -202,7 +202,7 @@ static void reconfigure(RepositoryCacheConfig repositoryCacheConfig) {
|
|||
|
||||
private volatile long expireAfter;
|
||||
|
||||
private Object schedulerLock = new Lock();
|
||||
private final Object schedulerLock = new Lock();
|
||||
|
||||
private RepositoryCache() {
|
||||
cacheMap = new ConcurrentHashMap<>();
|
||||
|
|
Loading…
Reference in New Issue