Refactor FileRepository.detectIndexChange()
Change-Id: I50c751e2e90f685dc27043c569da2eb210d4611b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
parent
f98112289c
commit
b782518cae
|
@ -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} */
|
||||
|
|
Loading…
Reference in New Issue