Skip to content

Commit

Permalink
8342083: Make a few fields in FileSystemPreferences final
Browse files Browse the repository at this point in the history
Reviewed-by: jpai, bpb
  • Loading branch information
Andrey Turbanov committed Oct 26, 2024
1 parent 762a573 commit 0e3fc93
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ private void replayChanges() {
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();
Expand Down Expand Up @@ -540,7 +540,7 @@ public Void run() {
}
});
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);
Expand Down Expand Up @@ -1008,12 +1008,12 @@ private void checkLockFile0ErrorCode (int errorCode)
* 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).
Expand Down

0 comments on commit 0e3fc93

Please sign in to comment.