Change-Id: I50c751e2e90f685dc27043c569da2eb210d4611b
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
try {
if (snapshot == null) {
snapshot = FileSnapshot.save(indexFile);
- } else if (snapshot.isModified(indexFile)) {
- snapshotLock.unlock();
- notifyIndexChanged(false);
+ return;
}
- } finally {
- if (snapshotLock.isHeldByCurrentThread()) {
- snapshotLock.unlock();
+ if (!snapshot.isModified(indexFile)) {
+ return;
}
+ } finally {
+ snapshotLock.unlock();
}
+ notifyIndexChanged(false);
}
/** {@inheritDoc} */