Waypoints created in SharedDomainFactory with null as PassingInstructions are created with PassingInstructions.None.

This commit is contained in:
Nick Klose committed 2014-01-29 16:25:24 +01:00
1 parent 3b2aaf0e8e
commit 170ef21b67
1 file changed
+1 -1
@@ -182,7 +182,7 @@ public class SharedDomainFactoryImpl implements SharedDomainFactory {
public Waypoint createWaypoint(ControlPoint controlPoint, PassingInstruction passingInstruction) {
synchronized (waypointCache) {
expungeStaleWaypointCacheEntries();
Waypoint result = new WaypointImpl(controlPoint, passingInstruction);
Waypoint result = passingInstruction==null?new WaypointImpl(controlPoint):new WaypointImpl(controlPoint, passingInstruction);
waypointCache.put(result.getId(), new WeakWaypointReference(result));
return result;
}