1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-30 02:02:06 +01:00

Use StringBuilder in parseContentDepth()

instead of StringBuffer, which comes with unnecessary synchronization
overhead.
This commit is contained in:
Florian Schmaus 2014-05-10 10:53:03 +02:00
parent 5618da4e23
commit 82654cd15e

View file

@ -154,7 +154,7 @@ public class PacketParserUtils {
} }
public static String parseContentDepth(XmlPullParser parser, int depth) throws XmlPullParserException, IOException { 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)) { while (!(parser.next() == XmlPullParser.END_TAG && parser.getDepth() == depth)) {
content.append(parser.getText()); content.append(parser.getText());
} }