From 82654cd15e8689c48a22911fa984253538ba6837 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Sat, 10 May 2014 10:53:03 +0200 Subject: [PATCH] Use StringBuilder in parseContentDepth() instead of StringBuffer, which comes with unnecessary synchronization overhead. --- .../java/org/jivesoftware/smack/util/PacketParserUtils.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java b/smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java index c9b7eb159..460254710 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java @@ -154,7 +154,7 @@ public class PacketParserUtils { } public static String parseContentDepth(XmlPullParser parser, int depth) throws XmlPullParserException, IOException { - StringBuffer content = new StringBuffer(); + StringBuilder content = new StringBuilder(); while (!(parser.next() == XmlPullParser.END_TAG && parser.getDepth() == depth)) { content.append(parser.getText()); }