mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-09 22:01:02 +00:00
Merge branch 'gwt' of ssh://git.wdf.sap.corp:29418/SAPSail/sapsailingcapture into gwt
This commit is contained in:
commit
3706d462cd
3 files changed
+19
-37
No files matched your search
@@ -59,7 +59,7 @@ public class CourseImpl extends NamedImpl implements Course {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addWaypoint(int zeroBasedPosition, Waypoint waypointToAdd) {
|
||||
public synchronized void addWaypoint(int zeroBasedPosition, Waypoint waypointToAdd) {
|
||||
waypoints.add(zeroBasedPosition, waypointToAdd);
|
||||
int legStartWaypointIndex;
|
||||
if (zeroBasedPosition == waypoints.size()-1) { // added to end
|
||||
@@ -72,7 +72,7 @@ public class CourseImpl extends NamedImpl implements Course {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeWaypoint(int zeroBasedPosition) {
|
||||
public synchronized void removeWaypoint(int zeroBasedPosition) {
|
||||
if (zeroBasedPosition >= 0) {
|
||||
boolean isLast = zeroBasedPosition == waypoints.size()-1;
|
||||
Waypoint removedWaypoint = waypoints.remove(zeroBasedPosition);
|
||||
@@ -147,7 +147,7 @@ public class CourseImpl extends NamedImpl implements Course {
|
||||
}
|
||||
|
||||
@Override
|
||||
public Waypoint getWaypointForControlPoint(ControlPoint controlPoint, int start) {
|
||||
public synchronized Waypoint getWaypointForControlPoint(ControlPoint controlPoint, int start) {
|
||||
if (start > legs.size()) {
|
||||
throw new IllegalArgumentException("Starting to search beyond end of course: "+start+" vs. "+(legs.size()+1));
|
||||
}
|
||||
|
||||
+5
-3
@@ -106,8 +106,11 @@ public abstract class TrackedRaceImpl implements TrackedRace, CourseListener {
|
||||
}
|
||||
}
|
||||
trackedLegs = new LinkedHashMap<Leg, TrackedLeg>();
|
||||
for (Leg leg : race.getCourse().getLegs()) {
|
||||
trackedLegs.put(leg, createTrackedLeg(leg));
|
||||
synchronized (race.getCourse()) {
|
||||
for (Leg leg : race.getCourse().getLegs()) {
|
||||
trackedLegs.put(leg, createTrackedLeg(leg));
|
||||
}
|
||||
getRace().getCourse().addCourseListener(this);
|
||||
}
|
||||
markPassingsForCompetitor = new HashMap<Competitor, NavigableSet<MarkPassing>>();
|
||||
tracks = new HashMap<Competitor, GPSFixTrack<Competitor, GPSFixMoving>>();
|
||||
@@ -125,7 +128,6 @@ public abstract class TrackedRaceImpl implements TrackedRace, CourseListener {
|
||||
}
|
||||
currentWindSource = WindSource.EXPEDITION;
|
||||
competitorRankings = new HashMap<TimePoint, List<Competitor>>();
|
||||
getRace().getCourse().addCourseListener(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in new issue
Block a user