Modified ThrustCurveMotor to ensure all fields have sane default values

Created MotorRowFilterTest unit test
This commit is contained in:
JoePfeiffer 2020-04-16 11:36:47 -06:00
parent 7745563c0d
commit ede47666f9
2 changed files with 12 additions and 12 deletions

View File

@ -30,21 +30,21 @@ public class ThrustCurveMotor implements Motor, Comparable<ThrustCurveMotor>, Se
private static final DesignationComparator DESIGNATION_COMPARATOR = new DesignationComparator();
private String digest;
private String digest = "";
private Manufacturer manufacturer;
private String designation;
private String description;
private Motor.Type type;
private double[] delays;
private Manufacturer manufacturer = Manufacturer.getManufacturer("UNKNOWN");
private String designation = "";
private String description = "";
private Motor.Type type = Motor.Type.UNKNOWN;
private double[] delays = {};
private double diameter;
private double length;
private double[] time;
private double[] thrust;
private Coordinate[] cg;
private double[] time = {};
private double[] thrust = {};
private Coordinate[] cg = {};
private String caseInfo;
private String propellantInfo;
private String caseInfo = "";
private String propellantInfo = "";
private double initialMass;
private double maxThrust;

View File

@ -206,7 +206,7 @@ public class MotorRowFilter extends RowFilter<TableModel, Integer> implements Ch
if ( m.getLength() > maximumLength ) {
return false;
}
if ( m.getLength() < minimumLength ) {
return false;
}