mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-25 21:43:49 +00:00
Changed constructors of WaypointImpl: PassingInstruction cannot be null, an IllegalArgumentException is thrown. If only a ControlPoint is used, the PassingInstructions are None.
This commit is contained in:
1 parent
1116bb9440
commit
5e959a7a26
1 file changed
+4
-1
+4
-1
@@ -16,7 +16,7 @@ public class WaypointImpl implements Waypoint {
|
||||
private final Bearing fixedBearing;
|
||||
|
||||
public WaypointImpl(ControlPoint controlPoint) {
|
||||
this(controlPoint, /*ControlPoint*/null, /*Bearing*/null);
|
||||
this(controlPoint, PassingInstruction.None, /*Bearing*/null);
|
||||
}
|
||||
|
||||
public WaypointImpl(ControlPoint controlPoint, PassingInstruction passingInstructions) {
|
||||
@@ -24,6 +24,9 @@ public class WaypointImpl implements Waypoint {
|
||||
}
|
||||
|
||||
public WaypointImpl(ControlPoint controlPoint, PassingInstruction passingInstructions, Bearing fixedBearing) {
|
||||
if (passingInstructions == null){
|
||||
throw new IllegalArgumentException("PassingInstructions cannot be null");
|
||||
}
|
||||
this.controlPoint = controlPoint;
|
||||
this.passingInstructions = passingInstructions;
|
||||
this.fixedBearing=fixedBearing;
|
||||
|
||||
Reference in new issue
Block a user