aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-08-01 12:25:07 +0200
committerChristian Schneppe <christian@pix-art.de>2017-08-01 12:25:07 +0200
commit55a9d56eda02dfb09fbc213d8aa8b7fcf8746a32 (patch)
treee8780c5e8a1768914bafa33e833d91912bfafb6e
parent9326c95bb6275bf6b683bd0454aa26355acc8fbf (diff)
check length first in timestamp parser
-rw-r--r--src/main/java/de/pixart/messenger/parser/AbstractParser.java2
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);