Merge branch 'master' into swisstiming_archiveconnector

This commit is contained in:
Axel Uhl committed 2012-12-18 00:55:29 +01:00
commit 19e9948c3c
1 file changed
+3 -1
@@ -1691,11 +1691,13 @@ public abstract class TrackedRaceImpl implements TrackedRace, CourseListener {
boolean markPassingsNotEmpty;
TimePoint extendedFrom = null;
MarkPassing crossedFinishLine = null;
// getLastWaypoint() will wait for a read lock on the course; do this outside the synchronized block to avoid deadlocks
final Waypoint lastWaypoint = getRace().getCourse().getLastWaypoint();
synchronized (markPassings) {
markPassingsNotEmpty = markPassings != null && !markPassings.isEmpty();
if (markPassingsNotEmpty) {
extendedFrom = markPassings.iterator().next().getTimePoint();
crossedFinishLine = getMarkPassing(competitor, getRace().getCourse().getLastWaypoint());
crossedFinishLine = getMarkPassing(competitor, lastWaypoint);
}
}
if (markPassingsNotEmpty) {