1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-23 12:32:06 +01:00

Fix minor issues

This commit is contained in:
Paul Schaub 2021-02-12 00:32:03 +01:00
parent 0f5297c957
commit 1b9fae8e52
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311
3 changed files with 9 additions and 2 deletions

View file

@ -484,7 +484,7 @@ public final class UserAvatarManager extends Manager {
*/ */
public void unpublishAvatar() public void unpublishAvatar()
throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, PubSubException.NotALeafNodeException { throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException, PubSubException.NotALeafNodeException {
getOrCreateMetadataNode().publish(new PayloadItem<>(new MetadataExtension(null))); getOrCreateMetadataNode().publish(new PayloadItem<>(new MetadataExtension()));
} }
@SuppressWarnings("UnnecessaryAnonymousClass") @SuppressWarnings("UnnecessaryAnonymousClass")

View file

@ -44,6 +44,13 @@ public class MetadataExtension implements ExtensionElement {
private final List<MetadataInfo> infos; private final List<MetadataInfo> infos;
private final List<MetadataPointer> pointers; private final List<MetadataPointer> pointers;
/**
* Empty constructor.
*/
public MetadataExtension() {
this(null);
}
/** /**
* Metadata Extension constructor. * Metadata Extension constructor.
* *

View file

@ -118,7 +118,7 @@ public class MetadataExtensionTest {
@Test @Test
public void checkEmptyMetadataExtensionParse() { public void checkEmptyMetadataExtensionParse() {
MetadataExtension metadataExtension = new MetadataExtension(null); MetadataExtension metadataExtension = new MetadataExtension();
assertEquals(emptyMetadataExtensionExample, metadataExtension.toXML().toString()); assertEquals(emptyMetadataExtensionExample, metadataExtension.toXML().toString());
} }