mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-27 07:56:38 +00:00
fixed locking; this commit fixes the failing test for bug 1666
This commit is contained in:
+2
-2
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user