Skip to content

Commit

Permalink
Restore check if initialization is still required
Browse files Browse the repository at this point in the history
  • Loading branch information
jjohannes committed Aug 28, 2017
1 parent 9226dda commit bf79214
Showing 1 changed file with 8 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,14 @@ public void open() {
try {
if (exclusiveLock != null) {
final FileLock acquiredExclusiveLock = exclusiveLock;
exclusiveLock.writeFile(new Runnable() {
public void run() {
initializationAction.initialize(acquiredExclusiveLock);
}
});
rebuild = initializationAction.requiresInitialization(acquiredExclusiveLock);
if (rebuild) {
exclusiveLock.writeFile(new Runnable() {
public void run() {
initializationAction.initialize(acquiredExclusiveLock);
}
});
}
}
} finally {
if (exclusiveLock != null) {
Expand Down

0 comments on commit bf79214

Please sign in to comment.