Merge branch 'issue-887' into unstable

Select thrustcurves from issue-887 branch
This commit is contained in:
JoePfeiffer 2021-10-26 16:05:02 -06:00
commit 734a0ffc1f
3 changed files with 9 additions and 1 deletions

View File

@ -2,6 +2,8 @@ package net.sf.openrocket.thrustcurve;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.HashMap; import java.util.HashMap;
import org.xml.sax.InputSource; import org.xml.sax.InputSource;
@ -172,6 +174,12 @@ public class SearchResponseParser implements ElementHandler {
case availability: case availability:
currentMotor.setAvailability(content); currentMotor.setAvailability(content);
break; break;
case updated_on:
SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
try {
currentMotor.setUpdated_on(formatter.parse(content));
} catch (ParseException ignored) { }
break;
} }
} }

View File

@ -292,7 +292,7 @@ public class TCMotor implements Cloneable {
+ ", info_url=" + info_url + ", tot_mass_g=" + tot_mass_g + ", info_url=" + info_url + ", tot_mass_g=" + tot_mass_g
+ ", prop_mass_g=" + prop_mass_g + ", delays=" + delays + ", prop_mass_g=" + prop_mass_g + ", delays=" + delays
+ ", case_info=" + case_info + ", prop_info=" + prop_info + ", case_info=" + case_info + ", prop_info=" + prop_info
+ ", updated_on=" + updated_on + "]"; + ", updated_on=" + updated_on + ", availability=" + availability + "]";
} }
} }