mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-22 14:22:05 +01:00
Change Packet.getExtensionsXML()
Remove the synchronized, as getExtensions() is properly synchronized and will return a copy. Return XmlStringBuilder instead of CharSequence to take advantage of fast XmlStringBuilder.append(XmlStringBuilder). Mark the method as final, as it should not be overwritten.
This commit is contained in:
parent
10643cce7c
commit
77a4867450
1 changed files with 1 additions and 1 deletions
|
@ -354,7 +354,7 @@ public abstract class Packet extends TopLevelStreamElement {
|
||||||
* @return the extension sub-packets as XML or the Empty String if there
|
* @return the extension sub-packets as XML or the Empty String if there
|
||||||
* are no packet extensions.
|
* are no packet extensions.
|
||||||
*/
|
*/
|
||||||
protected synchronized CharSequence getExtensionsXML() {
|
protected final XmlStringBuilder getExtensionsXML() {
|
||||||
XmlStringBuilder xml = new XmlStringBuilder();
|
XmlStringBuilder xml = new XmlStringBuilder();
|
||||||
// Add in all standard extension sub-packets.
|
// Add in all standard extension sub-packets.
|
||||||
for (PacketExtension extension : getExtensions()) {
|
for (PacketExtension extension : getExtensions()) {
|
||||||
|
|
Loading…
Reference in a new issue