fixed locking; this commit fixes the failing test for bug 1666

This commit is contained in:
Axel Uhl
2014-03-12 00:07:52 +01:00
parent 528b14b10e
commit 881872051a
@@ -282,7 +282,7 @@ public class RaceLogImpl extends TrackImpl<RaceLogEvent> implements RaceLog {
@Override
public void merge(RaceLog other) {
lockForRead();
lockForWrite();
other.lockForRead();
try {
RaceLogEventComparator comparator = RaceLogEventComparator.INSTANCE;
@@ -319,8 +319,8 @@ public class RaceLogImpl extends TrackImpl<RaceLogEvent> implements RaceLog {
}
}
} finally {
unlockAfterRead();
other.unlockAfterRead();
unlockAfterWrite();
}
}
}