mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-23 02:58:00 +01:00
Use LinkedHashMap for PacketExtensions in Packet
to keep the order in which the elements are added. Some XEPs define a Schema using 'xs:sequence' (see for example XEP-60 § 17.1), so the order the PacketExtensions are added should be the same they are transformed to a XML String.
This commit is contained in:
parent
b9167c5fe2
commit
10643cce7c
1 changed files with 2 additions and 2 deletions
|
@ -25,7 +25,7 @@ import org.jxmpp.util.XmppStringUtils;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.LinkedHashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -62,7 +62,7 @@ public abstract class Packet extends TopLevelStreamElement {
|
||||||
*/
|
*/
|
||||||
private static final AtomicLong id = new AtomicLong();
|
private static final AtomicLong id = new AtomicLong();
|
||||||
|
|
||||||
private final Map<String, PacketExtension> packetExtensions = new HashMap<String, PacketExtension>(12);
|
private final Map<String, PacketExtension> packetExtensions = new LinkedHashMap<String, PacketExtension>(12);
|
||||||
|
|
||||||
private String packetID = null;
|
private String packetID = null;
|
||||||
private String to = null;
|
private String to = null;
|
||||||
|
|
Loading…
Reference in a new issue