Refactor FileRepository.detectIndexChange()

Change-Id: I50c751e2e90f685dc27043c569da2eb210d4611b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
Matthias Sohn 2018-06-08 09:42:13 +02:00
parent f98112289c
commit b782518cae
1 changed files with 6 additions and 6 deletions

View File

@ -557,15 +557,15 @@ private void detectIndexChanges() {
try {
if (snapshot == null) {
snapshot = FileSnapshot.save(indexFile);
} else if (snapshot.isModified(indexFile)) {
snapshotLock.unlock();
notifyIndexChanged(false);
return;
}
if (!snapshot.isModified(indexFile)) {
return;
}
} finally {
if (snapshotLock.isHeldByCurrentThread()) {
snapshotLock.unlock();
}
snapshotLock.unlock();
}
notifyIndexChanged(false);
}
/** {@inheritDoc} */