mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-26 16:22:06 +01:00
Use StringBuilder in parseContentDepth()
instead of StringBuffer, which comes with unnecessary synchronization overhead.
This commit is contained in:
parent
5618da4e23
commit
82654cd15e
1 changed files with 1 additions and 1 deletions
|
@ -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());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue