1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-10 18:59:41 +02:00

Store packet extensions in a HashMap

allowing O(1) lookups for PacketExtensions

The one EntityCapsManagerTest becomes obsolete with this change, as
duplicate extension elements (RFC 6120 § 8.4) are now no longer possible
after the stanza has been parsed (they still may be received on the
wire, but only the last duplicate will be added).
This commit is contained in:
Florian Schmaus 2014-10-26 19:32:19 +01:00
parent 9f56842ee4
commit f94f7590a6
3 changed files with 97 additions and 24 deletions

View file

@ -69,12 +69,6 @@ public class EntityCapsManagerTest extends InitExtensions {
assertTrue(di.containsDuplicateIdentities());
}
@Test
public void testVerificationDuplicateDataForm() {
DiscoverInfo di = createMalformedDiscoverInfo();
assertTrue(EntityCapsManager.verifyPacketExtensions(di));
}
private void testSimpleDirectoryCache(StringEncoder stringEncoder) throws IOException {
EntityCapsPersistentCache cache = new SimpleDirectoryPersistentCache(createTempDirectory());