check length first in timestamp parser
This commit is contained in:
parent
febee9863f
commit
0a20b87ebe
|
@ -68,7 +68,7 @@ public abstract class AbstractParser {
|
||||||
timestamp = timestamp.replace("Z", "+0000");
|
timestamp = timestamp.replace("Z", "+0000");
|
||||||
SimpleDateFormat dateFormat;
|
SimpleDateFormat dateFormat;
|
||||||
long ms;
|
long ms;
|
||||||
if (timestamp.charAt(19) == '.' && timestamp.length() >= 25) {
|
if (timestamp.length() >= 25 && timestamp.charAt(19) == '.') {
|
||||||
String millis = timestamp.substring(19,timestamp.length() - 5);
|
String millis = timestamp.substring(19,timestamp.length() - 5);
|
||||||
try {
|
try {
|
||||||
double fractions = Double.parseDouble("0" + millis);
|
double fractions = Double.parseDouble("0" + millis);
|
||||||
|
|
Loading…
Reference in a new issue