Test argument in FlightConfigurationID constructor. Initialize
FlightConfigurationID in SimulationOptions to new random id. Make the TestRockets compile
This commit is contained in:
parent
88f84396d0
commit
391571708f
@ -23,7 +23,7 @@ public final class FlightConfigurationID implements Comparable<FlightConfigurati
|
|||||||
}
|
}
|
||||||
|
|
||||||
public FlightConfigurationID(final String _str) {
|
public FlightConfigurationID(final String _str) {
|
||||||
if("".equals(_str)){
|
if(_str == null || "".equals(_str)){
|
||||||
this.key = UUID.randomUUID();
|
this.key = UUID.randomUUID();
|
||||||
}else{
|
}else{
|
||||||
this.key = UUID.fromString( _str);
|
this.key = UUID.fromString( _str);
|
||||||
|
@ -51,7 +51,7 @@ public class SimulationOptions implements ChangeSource, Cloneable {
|
|||||||
protected final Preferences preferences = Application.getPreferences();
|
protected final Preferences preferences = Application.getPreferences();
|
||||||
|
|
||||||
private final Rocket rocket;
|
private final Rocket rocket;
|
||||||
private FlightConfigurationID configId = FlightConfigurationID.ERROR_CONFIGURATION_FCID;
|
private FlightConfigurationID configId = new FlightConfigurationID();
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* NOTE: When adding/modifying parameters, they must also be added to the
|
* NOTE: When adding/modifying parameters, they must also be added to the
|
||||||
|
@ -1156,7 +1156,7 @@ public class TestRockets {
|
|||||||
public static OpenRocketDocument makeTestRocket_v106_withMotorMountIgnitionConfig() {
|
public static OpenRocketDocument makeTestRocket_v106_withMotorMountIgnitionConfig() {
|
||||||
Rocket rocket = new Rocket();
|
Rocket rocket = new Rocket();
|
||||||
rocket.setName("v106_withwithMotorMountIgnitionConfig");
|
rocket.setName("v106_withwithMotorMountIgnitionConfig");
|
||||||
FlightConfigurationID fcid = new FlightConfigurationID("2SecondDelay");
|
FlightConfigurationID fcid = new FlightConfigurationID();
|
||||||
|
|
||||||
// make stage
|
// make stage
|
||||||
AxialStage stage = new AxialStage();
|
AxialStage stage = new AxialStage();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user