[fixes #887] Include updated-on element in motor XML parsing
This commit is contained in:
parent
5c3db0f59c
commit
e3c8e61adf
@ -2,6 +2,8 @@ package net.sf.openrocket.thrustcurve;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.xml.sax.InputSource;
|
||||
@ -172,6 +174,12 @@ public class SearchResponseParser implements ElementHandler {
|
||||
case availability:
|
||||
currentMotor.setAvailability(content);
|
||||
break;
|
||||
case updated_on:
|
||||
SimpleDateFormat formatter = new SimpleDateFormat("dd-MM-yyyy");
|
||||
try {
|
||||
currentMotor.setUpdated_on(formatter.parse(content));
|
||||
} catch (ParseException ignored) { }
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user