diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-08-01 12:25:07 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-08-01 12:25:07 +0200 |
commit | 55a9d56eda02dfb09fbc213d8aa8b7fcf8746a32 (patch) | |
tree | e8780c5e8a1768914bafa33e833d91912bfafb6e | |
parent | 9326c95bb6275bf6b683bd0454aa26355acc8fbf (diff) |
check length first in timestamp parser
-rw-r--r-- | src/main/java/de/pixart/messenger/parser/AbstractParser.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/parser/AbstractParser.java b/src/main/java/de/pixart/messenger/parser/AbstractParser.java index 8c33ec25d..f85be0952 100644 --- a/src/main/java/de/pixart/messenger/parser/AbstractParser.java +++ b/src/main/java/de/pixart/messenger/parser/AbstractParser.java @@ -67,7 +67,7 @@ public abstract class AbstractParser { timestamp = timestamp.replace("Z", "+0000"); SimpleDateFormat dateFormat; long ms; - if (timestamp.charAt(19) == '.' && timestamp.length() >= 25) { + if (timestamp.length() >= 25 && timestamp.charAt(19) == '.') { String millis = timestamp.substring(19, timestamp.length() - 5); try { double fractions = Double.parseDouble("0" + millis); |