From c25f1283a19dad6e15c8f09f771b40c716b3bb99 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Sun, 22 Jun 2014 21:44:17 +0200 Subject: [PATCH] removed warnings --- src/eu/siacs/conversations/generator/MessageGenerator.java | 3 ++- src/eu/siacs/conversations/parser/AbstractParser.java | 6 +++--- src/eu/siacs/conversations/xmpp/XmppConnection.java | 1 - .../siacs/conversations/xmpp/jingle/JingleConnection.java | 5 ++--- .../conversations/xmpp/jingle/JingleSocks5Transport.java | 3 --- 5 files changed, 7 insertions(+), 11 deletions(-) diff --git a/src/eu/siacs/conversations/generator/MessageGenerator.java b/src/eu/siacs/conversations/generator/MessageGenerator.java index a0bb7fb8e..419db25a7 100644 --- a/src/eu/siacs/conversations/generator/MessageGenerator.java +++ b/src/eu/siacs/conversations/generator/MessageGenerator.java @@ -2,6 +2,7 @@ package eu.siacs.conversations.generator; import java.text.SimpleDateFormat; import java.util.Date; +import java.util.Locale; import java.util.TimeZone; import net.java.otr4j.OtrException; @@ -33,7 +34,7 @@ public class MessageGenerator { } private void addDelay(MessagePacket packet, long timestamp) { - final SimpleDateFormat mDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"); + final SimpleDateFormat mDateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'",Locale.US); mDateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); Element delay = packet.addChild("delay", "urn:xmpp:delay"); Date date = new Date(timestamp); diff --git a/src/eu/siacs/conversations/parser/AbstractParser.java b/src/eu/siacs/conversations/parser/AbstractParser.java index c06a5cbd9..f9a7b1c0e 100644 --- a/src/eu/siacs/conversations/parser/AbstractParser.java +++ b/src/eu/siacs/conversations/parser/AbstractParser.java @@ -3,8 +3,8 @@ package eu.siacs.conversations.parser; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; +import java.util.Locale; -import android.util.Log; import eu.siacs.conversations.entities.Account; import eu.siacs.conversations.entities.Contact; import eu.siacs.conversations.services.XmppConnectionService; @@ -26,7 +26,7 @@ public abstract class AbstractParser { "stamp"); stamp = stamp.replace("Z", "+0000"); if (stamp.contains(".")) { - Date date = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") + Date date = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ",Locale.US) .parse(stamp); if (now