8342083: Make a few fields in FileSystemPreferences final
Reviewed-by: jpai, bpb
This commit is contained in:
parent
762a573ef1
commit
0e3fc93dfb
@ -450,7 +450,7 @@ class FileSystemPreferences extends AbstractPreferences {
|
||||
changeLog.get(i).replay();
|
||||
}
|
||||
|
||||
private static Timer syncTimer = new Timer(true); // Daemon Thread
|
||||
private static final Timer syncTimer = new Timer(true); // Daemon Thread
|
||||
|
||||
static {
|
||||
addShutdownHook();
|
||||
@ -540,7 +540,7 @@ class FileSystemPreferences extends AbstractPreferences {
|
||||
}
|
||||
});
|
||||
if (newNode) {
|
||||
// These 2 things guarantee node will get wrtten at next flush/sync
|
||||
// These 2 things guarantee node will get written at next flush/sync
|
||||
prefsCache = new TreeMap<>();
|
||||
nodeCreate = new NodeCreate();
|
||||
changeLog.add(nodeCreate);
|
||||
@ -1008,12 +1008,12 @@ class FileSystemPreferences extends AbstractPreferences {
|
||||
* Initial time between lock attempts, in ms. The time is doubled
|
||||
* after each failing attempt (except the first).
|
||||
*/
|
||||
private static int INIT_SLEEP_TIME = 50;
|
||||
private static final int INIT_SLEEP_TIME = 50;
|
||||
|
||||
/**
|
||||
* Maximum number of lock attempts.
|
||||
*/
|
||||
private static int MAX_ATTEMPTS = 5;
|
||||
private static final int MAX_ATTEMPTS = 5;
|
||||
|
||||
/**
|
||||
* Release the appropriate file lock (user or system).
|
||||
|
Loading…
Reference in New Issue
Block a user