From 2eddf1949a25dbf46b27f04852325eeee7b34650 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Wed, 25 Sep 2024 15:15:04 +0200 Subject: [PATCH] [github ci] Build also with Java 21 --- .github/workflows/ci.yml | 3 ++- .../java/org/jivesoftware/smack/AbstractXMPPConnection.java | 1 + .../java/org/jivesoftware/smack/ConnectionConfiguration.java | 1 + .../smack/c2s/ModularXmppClientToServerConnection.java | 1 + .../java/org/jivesoftware/smack/packet/EmptyResultIQ.java | 3 ++- .../src/main/java/org/jivesoftware/smack/packet/IQ.java | 2 +- .../src/main/java/org/jivesoftware/smack/packet/Session.java | 1 + .../src/main/java/org/jivesoftware/smack/packet/Stanza.java | 2 +- .../src/main/java/org/jivesoftware/smack/proxy/ProxyInfo.java | 1 + .../java/org/jivesoftware/smack/util/XmlStringBuilder.java | 2 ++ .../java/org/jivesoftware/smack/DummyConnection.java | 3 ++- .../org/jivesoftware/smackx/debugger/EnhancedDebugger.java | 1 + .../java/org/jivesoftware/smackx/carbons/packet/Carbon.java | 4 +++- .../main/java/org/jivesoftware/smackx/dox/element/DnsIq.java | 3 ++- .../org/jivesoftware/smackx/httpfileupload/element/Slot.java | 1 + .../smackx/httpfileupload/element/SlotRequest.java | 1 + .../smackx/iot/control/element/IoTSetRequest.java | 3 ++- .../smackx/iot/data/element/IoTDataReadOutAccepted.java | 4 +++- .../smackx/iot/discovery/element/IoTUnregister.java | 3 ++- .../smackx/iot/provisioning/element/ClearCache.java | 3 ++- .../smackx/iot/provisioning/element/ClearCacheResponse.java | 4 +++- .../java/org/jivesoftware/smackx/mam/element/MamPrefsIQ.java | 1 + .../java/org/jivesoftware/smackx/mam/element/MamQueryIQ.java | 2 ++ .../smackx/muclight/element/MUCLightAffiliationsIQ.java | 1 + .../smackx/muclight/element/MUCLightChangeAffiliationsIQ.java | 1 + .../smackx/muclight/element/MUCLightCreateIQ.java | 1 + .../smackx/muclight/element/MUCLightDestroyIQ.java | 1 + .../smackx/muclight/element/MUCLightGetAffiliationsIQ.java | 1 + .../smackx/muclight/element/MUCLightGetConfigsIQ.java | 1 + .../smackx/muclight/element/MUCLightGetInfoIQ.java | 1 + .../smackx/muclight/element/MUCLightSetConfigsIQ.java | 1 + .../element/DisablePushNotificationsIQ.java | 1 + .../push_notifications/element/EnablePushNotificationsIQ.java | 1 + .../jivesoftware/smackx/blocking/element/BlockContactsIQ.java | 1 + .../smackx/blocking/element/UnblockContactsIQ.java | 1 + .../org/jivesoftware/smackx/bytestreams/ibb/packet/Close.java | 1 + .../org/jivesoftware/smackx/bytestreams/ibb/packet/Data.java | 1 + .../org/jivesoftware/smackx/bytestreams/ibb/packet/Open.java | 1 + .../jivesoftware/smackx/bytestreams/socks5/Socks5Proxy.java | 1 + .../smackx/bytestreams/socks5/packet/Bytestream.java | 1 + .../org/jivesoftware/smackx/commands/AdHocCommandHandler.java | 1 + .../org/jivesoftware/smackx/iqlast/packet/LastActivity.java | 2 ++ .../jivesoftware/smackx/iqprivate/packet/PrivateDataIQ.java | 4 +++- .../smackx/jingle/transports/JingleTransportManager.java | 1 + .../main/java/org/jivesoftware/smackx/ping/packet/Ping.java | 3 ++- .../java/org/jivesoftware/smackx/pubsub/packet/PubSub.java | 1 + .../main/java/org/jivesoftware/smackx/time/packet/Time.java | 3 ++- .../java/org/jivesoftware/smackx/xdata/form/FillableForm.java | 1 + .../java/org/jivesoftware/smack/StreamManagementTest.java | 3 ++- .../smackx/muc/MultiUserChatLowLevelIntegrationTest.java | 1 + .../org/jivesoftware/smackx/jingleold/mediaimpl/JMFInit.java | 1 + .../smackx/jingleold/mediaimpl/jmf/AudioMediaSession.java | 1 + .../smackx/jingleold/mediaimpl/jspeex/AudioMediaSession.java | 1 + .../smackx/jingleold/mediaimpl/sshare/ScreenShareSession.java | 1 + .../smackx/jingleold/mediaimpl/sshare/api/ImageReceiver.java | 1 + .../jingleold/mediaimpl/sshare/api/OctTreeQuantizer.java | 2 +- .../smackx/jingleold/mediaimpl/test/TestMediaSession.java | 1 + .../org/jivesoftware/smackx/jingleold/nat/FixedResolver.java | 1 + .../org/jivesoftware/smackx/jingleold/nat/ICEResolver.java | 1 + .../jivesoftware/smackx/jingleold/nat/TcpUdpBridgeClient.java | 1 + .../jivesoftware/smackx/jingleold/nat/TcpUdpBridgeServer.java | 1 + .../java/org/jivesoftware/smackx/jingleold/packet/Jingle.java | 4 ++++ .../smackx/jingleold/packet/JingleContentDescription.java | 1 + .../smackx/jingleold/packet/JingleContentInfo.java | 1 + .../smackx/jingleold/packet/JingleDescription.java | 1 + .../jivesoftware/smackx/jingleold/packet/JingleTransport.java | 4 ++++ .../smackx/workgroup/packet/DepartQueuePacket.java | 1 + .../jivesoftware/smackx/workgroup/settings/ChatSetting.java | 1 + .../jivesoftware/smackx/workgroup/settings/ChatSettings.java | 1 + .../org/jivesoftware/smackx/workgroup/user/Workgroup.java | 1 + .../jivesoftware/smackx/xroster/packet/RosterExchange.java | 1 + .../java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java | 1 + 72 files changed, 99 insertions(+), 17 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ddb006d2..b1019ea4b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,8 +11,9 @@ jobs: matrix: java: - 17 + - 21 env: - PRIMARY_JAVA_VERSION: 17 + PRIMARY_JAVA_VERSION: 21 steps: - name: Checkout diff --git a/smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java b/smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java index e29ed25f8..a3fc2f941 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java @@ -388,6 +388,7 @@ public abstract class AbstractXMPPConnection implements XMPPConnection { * * @param configuration The configuration which is used to establish the connection. */ + @SuppressWarnings("this-escape") protected AbstractXMPPConnection(ConnectionConfiguration configuration) { saslAuthentication = new SASLAuthentication(this, configuration); config = configuration; diff --git a/smack-core/src/main/java/org/jivesoftware/smack/ConnectionConfiguration.java b/smack-core/src/main/java/org/jivesoftware/smack/ConnectionConfiguration.java index 098f4b6a1..e9d8afe45 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/ConnectionConfiguration.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/ConnectionConfiguration.java @@ -672,6 +672,7 @@ public abstract class ConnectionConfiguration { private boolean compressionEnabled = false; private StanzaIdSourceFactory stanzaIdSourceFactory = new StandardStanzaIdSource.Factory(); + @SuppressWarnings("this-escape") protected Builder() { if (SmackConfiguration.DEBUG) { enableDefaultDebugger(); diff --git a/smack-core/src/main/java/org/jivesoftware/smack/c2s/ModularXmppClientToServerConnection.java b/smack-core/src/main/java/org/jivesoftware/smack/c2s/ModularXmppClientToServerConnection.java index 0ece95aa2..5f060311a 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/c2s/ModularXmppClientToServerConnection.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/c2s/ModularXmppClientToServerConnection.java @@ -658,6 +658,7 @@ public final class ModularXmppClientToServerConnection extends AbstractXMPPConne updateOutgoingStreamXmlEnvironmentOnStreamOpen(streamOpen); } + @SuppressWarnings("this-escape") public static class DisconnectedStateDescriptor extends StateDescriptor { protected DisconnectedStateDescriptor() { super(DisconnectedState.class, StateDescriptor.Property.finalState); diff --git a/smack-core/src/main/java/org/jivesoftware/smack/packet/EmptyResultIQ.java b/smack-core/src/main/java/org/jivesoftware/smack/packet/EmptyResultIQ.java index a4d977ac3..246e9de06 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/packet/EmptyResultIQ.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/packet/EmptyResultIQ.java @@ -1,6 +1,6 @@ /** * - * Copyright © 2014-2023 Florian Schmaus + * Copyright © 2014-2024 Florian Schmaus * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ public class EmptyResultIQ extends IQ { } // TODO: Deprecate when stanza builder and parsing logic is ready. + @SuppressWarnings("this-escape") public EmptyResultIQ() { super((String) null, null); setType(IQ.Type.result); diff --git a/smack-core/src/main/java/org/jivesoftware/smack/packet/IQ.java b/smack-core/src/main/java/org/jivesoftware/smack/packet/IQ.java index 8f87dae63..98f9880f3 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/packet/IQ.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/packet/IQ.java @@ -88,7 +88,7 @@ public abstract class IQ extends Stanza implements IqView { } @Override - public Type getType() { + public final Type getType() { return type; } diff --git a/smack-core/src/main/java/org/jivesoftware/smack/packet/Session.java b/smack-core/src/main/java/org/jivesoftware/smack/packet/Session.java index 48e0330c6..7e6331bb8 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/packet/Session.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/packet/Session.java @@ -39,6 +39,7 @@ public class Session extends SimpleIQ { public static final String ELEMENT = "session"; public static final String NAMESPACE = "urn:ietf:params:xml:ns:xmpp-session"; + @SuppressWarnings("this-escape") public Session() { super(ELEMENT, NAMESPACE); setType(IQ.Type.set); diff --git a/smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java b/smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java index a6d55ca47..88c30bbfa 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java @@ -203,7 +203,7 @@ public abstract class Stanza implements StanzaView, TopLevelStreamElement { * @param to who the packet is being sent to. */ // TODO: Mark this as deprecated once StanzaBuilder is ready and all call sites are gone. - public void setTo(Jid to) { + public final void setTo(Jid to) { this.to = to; } diff --git a/smack-core/src/main/java/org/jivesoftware/smack/proxy/ProxyInfo.java b/smack-core/src/main/java/org/jivesoftware/smack/proxy/ProxyInfo.java index 402a106a4..90433c5c8 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/proxy/ProxyInfo.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/proxy/ProxyInfo.java @@ -41,6 +41,7 @@ public class ProxyInfo { private ProxyType proxyType; private final ProxySocketConnection proxySocketConnection; + @SuppressWarnings("this-escape") public ProxyInfo(ProxyType pType, String pHost, int pPort, String pUser, String pPass) { this.proxyType = pType; diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/XmlStringBuilder.java b/smack-core/src/main/java/org/jivesoftware/smack/util/XmlStringBuilder.java index 9eec876c4..5c327157b 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/XmlStringBuilder.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/XmlStringBuilder.java @@ -47,6 +47,7 @@ public class XmlStringBuilder implements Appendable, CharSequence, Element { this(pe, null); } + @SuppressWarnings("this-escape") public XmlStringBuilder(NamedElement e) { this(); halfOpenElement(e.getElementName()); @@ -56,6 +57,7 @@ public class XmlStringBuilder implements Appendable, CharSequence, Element { this(element.getElementName(), element.getNamespace(), element.getLanguage(), enclosingXmlEnvironment); } + @SuppressWarnings("this-escape") public XmlStringBuilder(String elementName, String xmlNs, String xmlLang, XmlEnvironment enclosingXmlEnvironment) { sb = new LazyStringBuilder(); halfOpenElement(elementName); diff --git a/smack-core/src/testFixtures/java/org/jivesoftware/smack/DummyConnection.java b/smack-core/src/testFixtures/java/org/jivesoftware/smack/DummyConnection.java index 2faca2ebc..320bb1f9e 100644 --- a/smack-core/src/testFixtures/java/org/jivesoftware/smack/DummyConnection.java +++ b/smack-core/src/testFixtures/java/org/jivesoftware/smack/DummyConnection.java @@ -1,6 +1,6 @@ /** * - * Copyright 2010 Jive Software, 2022 Florian Schmaus. + * Copyright 2010 Jive Software, 2022-2024 Florian Schmaus. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -82,6 +82,7 @@ public class DummyConnection extends AbstractXMPPConnection { } } + @SuppressWarnings("this-escape") public DummyConnection(DummyConnectionConfiguration configuration) { super(configuration); diff --git a/smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebugger.java b/smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebugger.java index 23eba68ec..e57b4aaaa 100644 --- a/smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebugger.java +++ b/smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebugger.java @@ -178,6 +178,7 @@ public class EnhancedDebugger extends SmackDebugger { JTabbedPane tabbedPane; + @SuppressWarnings("this-escape") public EnhancedDebugger(XMPPConnection connection) { super(connection); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/carbons/packet/Carbon.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/carbons/packet/Carbon.java index 8f303cdff..77ef518f6 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/carbons/packet/Carbon.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/carbons/packet/Carbon.java @@ -1,6 +1,6 @@ /** * - * Copyright © 2014 Florian Schmaus + * Copyright © 2014-2024 Florian Schmaus * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,7 @@ public class Carbon { public static class Enable extends SimpleIQ { public static final String ELEMENT = "enable"; + @SuppressWarnings("this-escape") public Enable() { super(ELEMENT, NAMESPACE); setType(Type.set); @@ -37,6 +38,7 @@ public class Carbon { public static class Disable extends SimpleIQ { public static final String ELEMENT = "disable"; + @SuppressWarnings("this-escape") public Disable() { super(ELEMENT, NAMESPACE); setType(Type.set); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/dox/element/DnsIq.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/dox/element/DnsIq.java index 77c626eae..590906549 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/dox/element/DnsIq.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/dox/element/DnsIq.java @@ -1,6 +1,6 @@ /** * - * Copyright 2019 Florian Schmaus + * Copyright 2019-2024 Florian Schmaus * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -43,6 +43,7 @@ public class DnsIq extends IQ { this(new DnsMessage(dnsMessage)); } + @SuppressWarnings("this-escape") public DnsIq(DnsMessage dnsQuery, Jid to) { this(dnsQuery); setTo(to); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/httpfileupload/element/Slot.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/httpfileupload/element/Slot.java index 274e59bc0..48c61bec7 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/httpfileupload/element/Slot.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/httpfileupload/element/Slot.java @@ -46,6 +46,7 @@ public class Slot extends IQ { this(putUrl, getUrl, headers, NAMESPACE); } + @SuppressWarnings("this-escape") protected Slot(URL putUrl, URL getUrl, Map headers, String namespace) { super(ELEMENT, namespace); setType(Type.result); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/httpfileupload/element/SlotRequest.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/httpfileupload/element/SlotRequest.java index 961fc27e1..0fa8b484c 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/httpfileupload/element/SlotRequest.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/httpfileupload/element/SlotRequest.java @@ -53,6 +53,7 @@ public class SlotRequest extends IQ { this(uploadServiceAddress, filename, size, contentType, NAMESPACE); } + @SuppressWarnings("this-escape") protected SlotRequest(DomainBareJid uploadServiceAddress, String filename, long size, String contentType, String namespace) { super(ELEMENT, namespace); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/control/element/IoTSetRequest.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/control/element/IoTSetRequest.java index cd6d0b553..a3dad0268 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/control/element/IoTSetRequest.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/control/element/IoTSetRequest.java @@ -1,6 +1,6 @@ /** * - * Copyright © 2016-2017 Florian Schmaus + * Copyright © 2016-2024 Florian Schmaus * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,7 @@ public class IoTSetRequest extends IQ { private final Collection setData; + @SuppressWarnings("this-escape") public IoTSetRequest(Collection setData) { super(ELEMENT, NAMESPACE); setType(Type.set); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/data/element/IoTDataReadOutAccepted.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/data/element/IoTDataReadOutAccepted.java index 20d0a125d..279476cd2 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/data/element/IoTDataReadOutAccepted.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/data/element/IoTDataReadOutAccepted.java @@ -1,6 +1,6 @@ /** * - * Copyright © 2016 Florian Schmaus + * Copyright © 2016-2024 Florian Schmaus * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,6 +30,7 @@ public class IoTDataReadOutAccepted extends IQ { private final boolean queued; + @SuppressWarnings("this-escape") public IoTDataReadOutAccepted(int seqNr, boolean queued) { super(ELEMENT, NAMESPACE); this.seqNr = seqNr; @@ -37,6 +38,7 @@ public class IoTDataReadOutAccepted extends IQ { setType(Type.result); } + @SuppressWarnings("this-escape") public IoTDataReadOutAccepted(IoTDataRequest dataRequest) { this(dataRequest.getSequenceNr(), false); setStanzaId(dataRequest.getStanzaId()); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/discovery/element/IoTUnregister.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/discovery/element/IoTUnregister.java index bdc536f97..3b510e55f 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/discovery/element/IoTUnregister.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/discovery/element/IoTUnregister.java @@ -1,6 +1,6 @@ /** * - * Copyright 2016 Florian Schmaus + * Copyright 2016-2024 Florian Schmaus * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,6 +27,7 @@ public class IoTUnregister extends IQ { private final NodeInfo nodeInfo; + @SuppressWarnings("this-escape") public IoTUnregister(NodeInfo nodeInfo) { super(ELEMENT, NAMESPACE); this.nodeInfo = nodeInfo; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/provisioning/element/ClearCache.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/provisioning/element/ClearCache.java index fe98b32b3..d17e46c94 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/provisioning/element/ClearCache.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/provisioning/element/ClearCache.java @@ -1,6 +1,6 @@ /** * - * Copyright © 2016 Florian Schmaus + * Copyright © 2016-2024 Florian Schmaus * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,6 +23,7 @@ public class ClearCache extends SimpleIQ { public static final String ELEMENT = "clearCache"; public static final String NAMESPACE = Constants.IOT_PROVISIONING_NAMESPACE; + @SuppressWarnings("this-escape") public ClearCache() { super(ELEMENT, NAMESPACE); // IQs are always of type 'get' (XEP-0324 § 3.5.1, see also the XEPs history remarks) diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/provisioning/element/ClearCacheResponse.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/provisioning/element/ClearCacheResponse.java index 1c229d153..1abfb731c 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/provisioning/element/ClearCacheResponse.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/iot/provisioning/element/ClearCacheResponse.java @@ -1,6 +1,6 @@ /** * - * Copyright © 2016 Florian Schmaus + * Copyright © 2016-2024 Florian Schmaus * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -23,12 +23,14 @@ public class ClearCacheResponse extends SimpleIQ { public static final String ELEMENT = "clearCacheResponse"; public static final String NAMESPACE = Constants.IOT_PROVISIONING_NAMESPACE; + @SuppressWarnings("this-escape") public ClearCacheResponse() { super(ELEMENT, NAMESPACE); // IQs are always of type 'result' (XEP-0324 § 3.5.1, see also the XEPs history remarks) setType(Type.result); } + @SuppressWarnings("this-escape") public ClearCacheResponse(ClearCache clearCacheRequest) { this(); setStanzaId(clearCacheRequest.getStanzaId()); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamPrefsIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamPrefsIQ.java index e5898f4c3..1a5535135 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamPrefsIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamPrefsIQ.java @@ -81,6 +81,7 @@ public class MamPrefsIQ extends IQ { * @param neverJids TODO javadoc me please * @param defaultBehavior TODO javadoc me please */ + @SuppressWarnings("this-escape") public MamPrefsIQ(MamVersion version, List alwaysJids, List neverJids, DefaultBehavior defaultBehavior) { super(ELEMENT, version.getNamespace()); setType(Type.set); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamQueryIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamQueryIQ.java index 3909b077c..17b8a5cae 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamQueryIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamQueryIQ.java @@ -45,6 +45,7 @@ public class MamQueryIQ extends IQ { * @param version TODO javadoc me please * @param queryId TODO javadoc me please */ + @SuppressWarnings("this-escape") public MamQueryIQ(MamVersion version, String queryId) { this(version, queryId, null, null); setType(IQ.Type.get); @@ -79,6 +80,7 @@ public class MamQueryIQ extends IQ { * @param node TODO javadoc me please * @param dataForm TODO javadoc me please */ + @SuppressWarnings("this-escape") public MamQueryIQ(MamVersion version, String queryId, String node, DataForm dataForm) { super(ELEMENT, version.getNamespace()); this.queryId = queryId; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightAffiliationsIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightAffiliationsIQ.java index c9e0ead62..e1e8fcdf4 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightAffiliationsIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightAffiliationsIQ.java @@ -48,6 +48,7 @@ public class MUCLightAffiliationsIQ extends IQ { * @param version TODO javadoc me please * @param affiliations TODO javadoc me please */ + @SuppressWarnings("this-escape") public MUCLightAffiliationsIQ(String version, HashMap affiliations) { super(ELEMENT, NAMESPACE); this.version = version; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightChangeAffiliationsIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightChangeAffiliationsIQ.java index 494a7a4d7..2898ea8b6 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightChangeAffiliationsIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightChangeAffiliationsIQ.java @@ -47,6 +47,7 @@ public class MUCLightChangeAffiliationsIQ extends IQ { * @param room TODO javadoc me please * @param affiliations TODO javadoc me please */ + @SuppressWarnings("this-escape") public MUCLightChangeAffiliationsIQ(Jid room, HashMap affiliations) { super(ELEMENT, NAMESPACE); this.setType(Type.set); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightCreateIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightCreateIQ.java index d15d47db5..afd8efd90 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightCreateIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightCreateIQ.java @@ -53,6 +53,7 @@ public class MUCLightCreateIQ extends IQ { * @param customConfigs TODO javadoc me please * @param occupants TODO javadoc me please */ + @SuppressWarnings("this-escape") public MUCLightCreateIQ(EntityJid room, String roomName, String subject, HashMap customConfigs, List occupants) { super(ELEMENT, NAMESPACE); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightDestroyIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightDestroyIQ.java index 8198007cf..6606ae035 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightDestroyIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightDestroyIQ.java @@ -38,6 +38,7 @@ public class MUCLightDestroyIQ extends IQ { * * @param roomJid TODO javadoc me please */ + @SuppressWarnings("this-escape") public MUCLightDestroyIQ(Jid roomJid) { super(ELEMENT, NAMESPACE); this.setType(Type.set); diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetAffiliationsIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetAffiliationsIQ.java index 67cd26481..70249914c 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetAffiliationsIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetAffiliationsIQ.java @@ -41,6 +41,7 @@ public class MUCLightGetAffiliationsIQ extends IQ { * @param roomJid TODO javadoc me please * @param version TODO javadoc me please */ + @SuppressWarnings("this-escape") public MUCLightGetAffiliationsIQ(Jid roomJid, String version) { super(ELEMENT, NAMESPACE); this.version = version; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetConfigsIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetConfigsIQ.java index 15ce3e1f9..aff4283ee 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetConfigsIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetConfigsIQ.java @@ -41,6 +41,7 @@ public class MUCLightGetConfigsIQ extends IQ { * @param roomJid TODO javadoc me please * @param version TODO javadoc me please */ + @SuppressWarnings("this-escape") public MUCLightGetConfigsIQ(Jid roomJid, String version) { super(ELEMENT, NAMESPACE); this.version = version; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetInfoIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetInfoIQ.java index 112ec1935..6e3d1daa0 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetInfoIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightGetInfoIQ.java @@ -41,6 +41,7 @@ public class MUCLightGetInfoIQ extends IQ { * @param roomJid TODO javadoc me please * @param version TODO javadoc me please */ + @SuppressWarnings("this-escape") public MUCLightGetInfoIQ(Jid roomJid, String version) { super(ELEMENT, NAMESPACE); this.version = version; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightSetConfigsIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightSetConfigsIQ.java index 0751b582f..6ab25a9ed 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightSetConfigsIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/muclight/element/MUCLightSetConfigsIQ.java @@ -49,6 +49,7 @@ public class MUCLightSetConfigsIQ extends IQ { * @param subject TODO javadoc me please * @param customConfigs TODO javadoc me please */ + @SuppressWarnings("this-escape") public MUCLightSetConfigsIQ(Jid roomJid, String roomName, String subject, HashMap customConfigs) { super(ELEMENT, NAMESPACE); this.roomName = roomName; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/push_notifications/element/DisablePushNotificationsIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/push_notifications/element/DisablePushNotificationsIQ.java index bedf8be02..08342811b 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/push_notifications/element/DisablePushNotificationsIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/push_notifications/element/DisablePushNotificationsIQ.java @@ -43,6 +43,7 @@ public class DisablePushNotificationsIQ extends IQ { private final Jid jid; private final String node; + @SuppressWarnings("this-escape") public DisablePushNotificationsIQ(Jid jid, String node) { super(ELEMENT, NAMESPACE); this.jid = jid; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/push_notifications/element/EnablePushNotificationsIQ.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/push_notifications/element/EnablePushNotificationsIQ.java index 428b41b67..643de425a 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/push_notifications/element/EnablePushNotificationsIQ.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/push_notifications/element/EnablePushNotificationsIQ.java @@ -53,6 +53,7 @@ public class EnablePushNotificationsIQ extends IQ { private final String node; private final HashMap publishOptions; + @SuppressWarnings("this-escape") public EnablePushNotificationsIQ(Jid jid, String node, HashMap publishOptions) { super(ELEMENT, NAMESPACE); this.jid = jid; diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/BlockContactsIQ.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/BlockContactsIQ.java index 39cb9525b..79bd2068a 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/BlockContactsIQ.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/BlockContactsIQ.java @@ -51,6 +51,7 @@ public class BlockContactsIQ extends IQ { * * @param jids TODO javadoc me please */ + @SuppressWarnings("this-escape") public BlockContactsIQ(List jids) { super(ELEMENT, NAMESPACE); this.setType(Type.set); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/UnblockContactsIQ.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/UnblockContactsIQ.java index e0a28f722..efba53e3a 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/UnblockContactsIQ.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/blocking/element/UnblockContactsIQ.java @@ -52,6 +52,7 @@ public class UnblockContactsIQ extends IQ { * * @param jids TODO javadoc me please */ + @SuppressWarnings("this-escape") public UnblockContactsIQ(List jids) { super(ELEMENT, NAMESPACE); this.setType(Type.set); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/packet/Close.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/packet/Close.java index cdd002590..9147cdd72 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/packet/Close.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/packet/Close.java @@ -36,6 +36,7 @@ public class Close extends IQ { * * @param sessionID unique session ID identifying this In-Band Bytestream */ + @SuppressWarnings("this-escape") public Close(String sessionID) { super(ELEMENT, NAMESPACE); if (sessionID == null || "".equals(sessionID)) { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/packet/Data.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/packet/Data.java index 54bbaeb80..77ceb9450 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/packet/Data.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/packet/Data.java @@ -34,6 +34,7 @@ public class Data extends IQ { * * @param data data stanza extension containing the encoded data */ + @SuppressWarnings("this-escape") public Data(DataPacketExtension data) { super(DataPacketExtension.ELEMENT, DataPacketExtension.NAMESPACE); if (data == null) { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/packet/Open.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/packet/Open.java index 768cf3f20..a2e54bdaf 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/packet/Open.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/packet/Open.java @@ -54,6 +54,7 @@ public class Open extends IQ { * @param blockSize block size in which the data will be fragmented * @param stanza stanza type used to encapsulate the data */ + @SuppressWarnings("this-escape") public Open(String sessionID, int blockSize, StanzaType stanza) { super(ELEMENT, NAMESPACE); if (sessionID == null || "".equals(sessionID)) { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5Proxy.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5Proxy.java index 9d1191b3e..117333095 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5Proxy.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5Proxy.java @@ -149,6 +149,7 @@ public class Socks5Proxy { * * @param serverSocket the server socket to use */ + @SuppressWarnings("this-escape") protected Socks5Proxy(ServerSocket serverSocket) { this.serverProcess = new Socks5ServerProcess(); this.serverSocket = serverSocket; diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/packet/Bytestream.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/packet/Bytestream.java index 486f89a74..bc049a034 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/packet/Bytestream.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/socks5/packet/Bytestream.java @@ -68,6 +68,7 @@ public class Bytestream extends IQ { * @param SID The session ID related to the negotiation. * @see #setSessionID(String) */ + @SuppressWarnings("this-escape") public Bytestream(final String SID) { this(); setSessionID(SID); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandHandler.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandHandler.java index 181fa7c3d..5eb6d6dda 100755 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandHandler.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandHandler.java @@ -57,6 +57,7 @@ public abstract class AdHocCommandHandler extends AbstractAdHocCommand { */ private int currentStage; + @SuppressWarnings("this-escape") public AdHocCommandHandler(String node, String name, String sessionId) { super(node, name); setSessionId(sessionId); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/iqlast/packet/LastActivity.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/iqlast/packet/LastActivity.java index 08d3ac686..9a94d0198 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/iqlast/packet/LastActivity.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/iqlast/packet/LastActivity.java @@ -45,11 +45,13 @@ public class LastActivity extends IQ { public long lastActivity = -1; public String message; + @SuppressWarnings("this-escape") public LastActivity() { super(ELEMENT, NAMESPACE); setType(IQ.Type.get); } + @SuppressWarnings("this-escape") public LastActivity(Jid to) { this(); setTo(to); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/iqprivate/packet/PrivateDataIQ.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/iqprivate/packet/PrivateDataIQ.java index 6063e040e..5df357e09 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/iqprivate/packet/PrivateDataIQ.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/iqprivate/packet/PrivateDataIQ.java @@ -1,6 +1,6 @@ /** * - * Copyright © 2014 Florian Schmaus + * Copyright 2014-2024 Florian Schmaus * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,11 +27,13 @@ public class PrivateDataIQ extends IQ { private final String getElement; private final String getNamespace; + @SuppressWarnings("this-escape") public PrivateDataIQ(PrivateData privateData) { this(privateData, null, null); setType(Type.set); } + @SuppressWarnings("this-escape") public PrivateDataIQ(String element, String namespace) { this(null, element, namespace); setType(Type.get); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/transports/JingleTransportManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/transports/JingleTransportManager.java index 8c91c8976..ba344ee7c 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/transports/JingleTransportManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/jingle/transports/JingleTransportManager.java @@ -30,6 +30,7 @@ public abstract class JingleTransportManager i private final XMPPConnection connection; + @SuppressWarnings("this-escape") public JingleTransportManager(XMPPConnection connection) { this.connection = connection; connection.addConnectionListener(this); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/ping/packet/Ping.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/ping/packet/Ping.java index ac46a76c4..431c1c522 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/ping/packet/Ping.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/ping/packet/Ping.java @@ -1,6 +1,6 @@ /** * - * Copyright 2012-2019 Florian Schmaus + * Copyright 2012-2024 Florian Schmaus * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,7 @@ public class Ping extends SimpleIQ { super(ELEMENT, NAMESPACE); } + @SuppressWarnings("this-escape") public Ping(Jid to) { this(); setTo(to); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/packet/PubSub.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/packet/PubSub.java index cf708afe9..138558207 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/packet/PubSub.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/pubsub/packet/PubSub.java @@ -43,6 +43,7 @@ public class PubSub extends IQ { super(ELEMENT, ns.getXmlns()); } + @SuppressWarnings("this-escape") public PubSub(Jid to, Type type, PubSubNamespace ns) { super(ELEMENT, (ns == null ? PubSubNamespace.basic : ns).getXmlns()); setTo(to); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/time/packet/Time.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/time/packet/Time.java index bb7632210..387a7d390 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/time/packet/Time.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/time/packet/Time.java @@ -1,6 +1,6 @@ /** * - * Copyright 2003-2007 Jive Software, 2014-2021 Florian Schmaus + * Copyright 2003-2007 Jive Software, 2014-2024 Florian Schmaus * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -46,6 +46,7 @@ public class Time extends IQ implements TimeView { private final String utc; private final String tzo; + @SuppressWarnings("this-escape") public Time(TimeBuilder timeBuilder) { super(timeBuilder, ELEMENT, NAMESPACE); utc = timeBuilder.getUtc(); diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/form/FillableForm.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/form/FillableForm.java index 04cee2654..302156c2c 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/form/FillableForm.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/form/FillableForm.java @@ -49,6 +49,7 @@ public class FillableForm extends FilledForm { private final Map filledFields = new HashMap<>(); + @SuppressWarnings("this-escape") public FillableForm(DataForm dataForm) { super(dataForm); if (dataForm.getType() != DataForm.Type.form) { diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smack/StreamManagementTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smack/StreamManagementTest.java index 78d075af3..fdbb755c7 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smack/StreamManagementTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smack/StreamManagementTest.java @@ -1,6 +1,6 @@ /** * - * Copyright 2015-2020 Florian Schmaus + * Copyright 2015-2024 Florian Schmaus * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -36,6 +36,7 @@ import org.jxmpp.jid.EntityFullJid; public class StreamManagementTest extends AbstractSmackSpecificLowLevelIntegrationTest { + @SuppressWarnings("this-escape") public StreamManagementTest(SmackIntegrationTestEnvironment environment) throws Exception { super(environment, XMPPTCPConnection.class); XMPPTCPConnection connection = getSpecificUnconnectedConnection(); diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatLowLevelIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatLowLevelIntegrationTest.java index c70e61c7e..e13384940 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatLowLevelIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatLowLevelIntegrationTest.java @@ -42,6 +42,7 @@ import org.jxmpp.jid.parts.Resourcepart; @SpecificationReference(document = "XEP-0048", version = "1.2") public class MultiUserChatLowLevelIntegrationTest extends AbstractSmackLowLevelIntegrationTest { + @SuppressWarnings("this-escape") public MultiUserChatLowLevelIntegrationTest(SmackIntegrationTestEnvironment environment) throws Exception { super(environment); AbstractXMPPConnection connection = getConnectedConnection(); diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/JMFInit.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/JMFInit.java index ed86a85de..d41cdcb5f 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/JMFInit.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/JMFInit.java @@ -43,6 +43,7 @@ public class JMFInit extends Frame implements Runnable { private boolean visible = false; + @SuppressWarnings("this-escape") public JMFInit(String[] args, boolean visible) { super("Initializing JMF..."); diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/AudioMediaSession.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/AudioMediaSession.java index 42525c68d..22013df8b 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/AudioMediaSession.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jmf/AudioMediaSession.java @@ -53,6 +53,7 @@ public class AudioMediaSession extends JingleMediaSession { * @param locator media locator * @param jingleSession the jingle session. */ + @SuppressWarnings("this-escape") public AudioMediaSession(final PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, String locator, JingleSession jingleSession) { super(payloadType, remote, local, locator == null ? "dsound://" : locator, jingleSession); diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jspeex/AudioMediaSession.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jspeex/AudioMediaSession.java index 78495aa17..162483cd7 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jspeex/AudioMediaSession.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/jspeex/AudioMediaSession.java @@ -104,6 +104,7 @@ public class AudioMediaSession extends JingleMediaSession implements MediaSessio * @param locator media locator * @param jingleSession the jingle session. */ + @SuppressWarnings("this-escape") public AudioMediaSession(final PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, String locator, JingleSession jingleSession) { super(payloadType, remote, local, locator == null ? "dsound://" : locator, jingleSession); diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/ScreenShareSession.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/ScreenShareSession.java index 8a33211e0..2cae0fc22 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/ScreenShareSession.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/ScreenShareSession.java @@ -66,6 +66,7 @@ public class ScreenShareSession extends JingleMediaSession { * @param locator media locator * @param jingleSession the jingle session. */ + @SuppressWarnings("this-escape") public ScreenShareSession(final PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, final String locator, JingleSession jingleSession) { super(payloadType, remote, local, "Screen", jingleSession); diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/ImageReceiver.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/ImageReceiver.java index c3642d6dd..ed3010be7 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/ImageReceiver.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/ImageReceiver.java @@ -48,6 +48,7 @@ public class ImageReceiver extends Canvas { private int remotePort; private ImageDecoder decoder; + @SuppressWarnings("this-escape") public ImageReceiver(final InetAddress remoteHost, final int remotePort, final int localPort, int width, int height) { tiles = new BufferedImage[width][height]; diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/OctTreeQuantizer.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/OctTreeQuantizer.java index 91cdd7de0..cff438024 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/OctTreeQuantizer.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/sshare/api/OctTreeQuantizer.java @@ -76,7 +76,7 @@ public class OctTreeQuantizer implements Quantizer { private int colors = 0; private final List> colorList; - @SuppressWarnings("JdkObsolete") + @SuppressWarnings({"JdkObsolete", "this-escape"}) public OctTreeQuantizer() { setup(256); colorList = new ArrayList<>(MAX_LEVEL + 1); diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/test/TestMediaSession.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/test/TestMediaSession.java index 1bb4cf746..edfa5a83a 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/test/TestMediaSession.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/mediaimpl/test/TestMediaSession.java @@ -37,6 +37,7 @@ public class TestMediaSession extends JingleMediaSession { * @param locator media locator * @param jingleSession the jingle session. */ + @SuppressWarnings("this-escape") public TestMediaSession(final PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, final String locator, JingleSession jingleSession) { super(payloadType, remote, local, "Test", jingleSession); diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/FixedResolver.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/FixedResolver.java index d1ea13fad..0a21ac4aa 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/FixedResolver.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/FixedResolver.java @@ -38,6 +38,7 @@ public class FixedResolver extends TransportResolver { * @param ip the IP address. * @param port the port number. */ + @SuppressWarnings("this-escape") public FixedResolver(String ip, int port) { super(); setFixedCandidate(ip, port); diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/ICEResolver.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/ICEResolver.java index f286f5f38..95fce2b6c 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/ICEResolver.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/ICEResolver.java @@ -56,6 +56,7 @@ public class ICEResolver extends TransportResolver { static Map negociatorsMap = new HashMap<>(); // ICENegociator iceNegociator = null; + @SuppressWarnings("this-escape") public ICEResolver(XMPPConnection connection, String server, int port) { super(); this.connection = connection; diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TcpUdpBridgeClient.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TcpUdpBridgeClient.java index 8e3936719..3451b7c1c 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TcpUdpBridgeClient.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TcpUdpBridgeClient.java @@ -45,6 +45,7 @@ public class TcpUdpBridgeClient { private DatagramSocket localUdpSocket; private Socket localTcpSocket; + @SuppressWarnings("this-escape") public TcpUdpBridgeClient(String remoteTcpHost, String remoteUdpHost, int remoteTcpPort, int remoteUdpPort) { this.remoteTcpHost = remoteTcpHost; this.remoteUdpHost = remoteUdpHost; diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TcpUdpBridgeServer.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TcpUdpBridgeServer.java index 2ff8744b5..d5abc6bee 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TcpUdpBridgeServer.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/TcpUdpBridgeServer.java @@ -48,6 +48,7 @@ public class TcpUdpBridgeServer { private Socket localTcpSocket; private ServerSocket serverTcpSocket; + @SuppressWarnings("this-escape") public TcpUdpBridgeServer(String remoteTcpHost, String remoteUdpHost, int remoteTcpPort, int remoteUdpPort) { this.remoteTcpHost = remoteTcpHost; this.remoteUdpHost = remoteUdpHost; diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/Jingle.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/Jingle.java index d904f0d34..9ac5270f6 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/Jingle.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/Jingle.java @@ -71,6 +71,7 @@ public class Jingle extends IQ { * @param mi the jingle content info * @param sid the sid. */ + @SuppressWarnings("this-escape") public Jingle(final List contents, final JingleContentInfo mi, final String sid) { this(); @@ -93,6 +94,7 @@ public class Jingle extends IQ { * * @param content a content */ + @SuppressWarnings("this-escape") public Jingle(final JingleContent content) { this(); @@ -112,6 +114,7 @@ public class Jingle extends IQ { * * @param info The content info */ + @SuppressWarnings("this-escape") public Jingle(final JingleContentInfo info) { this(); @@ -131,6 +134,7 @@ public class Jingle extends IQ { * * @param action The action. */ + @SuppressWarnings("this-escape") public Jingle(final JingleActionEnum action) { this(null, null, null); this.action = action; diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleContentDescription.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleContentDescription.java index 3df98e574..fc65a4435 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleContentDescription.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleContentDescription.java @@ -184,6 +184,7 @@ public abstract class JingleContentDescription implements ExtensionElement { * * @param pt the payload type. */ + @SuppressWarnings("this-escape") public Audio(final JinglePayloadType pt) { super(); addJinglePayloadType(pt); diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleContentInfo.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleContentInfo.java index 9d5d7795b..caed15f9d 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleContentInfo.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleContentInfo.java @@ -99,6 +99,7 @@ public class JingleContentInfo implements ExtensionElement { public static final String NAMESPACE = "urn:xmpp:tmp:jingle:apps:rtp"; + @SuppressWarnings("this-escape") public Audio(final ContentInfo mi) { super(mi); setNamespace(NAMESPACE); diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleDescription.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleDescription.java index 4e143f266..f2d2fdf82 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleDescription.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleDescription.java @@ -191,6 +191,7 @@ public abstract class JingleDescription implements ExtensionElement { * * @param pt the payload type. */ + @SuppressWarnings("this-escape") public Audio(final PayloadType pt) { super(); addPayloadType(pt); diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleTransport.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleTransport.java index 40553ea27..1162df9d9 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleTransport.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/packet/JingleTransport.java @@ -55,6 +55,7 @@ public class JingleTransport implements ExtensionElement { * * @param candidate A transport candidate element to add. */ + @SuppressWarnings("this-escape") public JingleTransport(final JingleTransportCandidate candidate) { super(); addCandidate(candidate); @@ -202,6 +203,7 @@ public class JingleTransport implements ExtensionElement { * * @param candidate the jmf transport candidate */ + @SuppressWarnings("this-escape") public JingleTransportCandidate(final TransportCandidate candidate) { super(); setMediaTransport(candidate); @@ -272,6 +274,7 @@ public class JingleTransport implements ExtensionElement { public static class Ice extends JingleTransport { public static final String NAMESPACE = "urn:xmpp:tmp:jingle:transports:ice-udp"; + @SuppressWarnings("this-escape") public Ice() { super(); setNamespace(NAMESPACE); @@ -359,6 +362,7 @@ public class JingleTransport implements ExtensionElement { public static class RawUdp extends JingleTransport { public static final String NAMESPACE = "http://www.xmpp.org/extensions/xep-0177.html#ns"; + @SuppressWarnings("this-escape") public RawUdp() { super(); setNamespace(NAMESPACE); diff --git a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/packet/DepartQueuePacket.java b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/packet/DepartQueuePacket.java index abe8771ca..8917ebe3e 100644 --- a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/packet/DepartQueuePacket.java +++ b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/packet/DepartQueuePacket.java @@ -53,6 +53,7 @@ public class DepartQueuePacket extends IQ { * @param workgroup the workgroup to depart. * @param user the user to make depart from the queue. */ + @SuppressWarnings("this-escape") public DepartQueuePacket(EntityBareJid workgroup, EntityJid user) { super("depart-queue", "http://jabber.org/protocol/workgroup"); this.user = user; diff --git a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/settings/ChatSetting.java b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/settings/ChatSetting.java index 00a227c61..499d3fac5 100644 --- a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/settings/ChatSetting.java +++ b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/settings/ChatSetting.java @@ -22,6 +22,7 @@ public class ChatSetting { private String value; private int type; + @SuppressWarnings("this-escape") public ChatSetting(String key, String value, int type) { setKey(key); setValue(value); diff --git a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/settings/ChatSettings.java b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/settings/ChatSettings.java index ddec1a662..8613deb96 100644 --- a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/settings/ChatSettings.java +++ b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/settings/ChatSettings.java @@ -66,6 +66,7 @@ public class ChatSettings extends IQ { settings = new ArrayList<>(); } + @SuppressWarnings("this-escape") public ChatSettings(String key) { this(); setKey(key); diff --git a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java index adb17a07e..ca65956e3 100644 --- a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java +++ b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/user/Workgroup.java @@ -99,6 +99,7 @@ public class Workgroup { * @param connection an XMPP connection which must have already undergone a * successful login. */ + @SuppressWarnings("this-escape") public Workgroup(EntityBareJid workgroupJID, XMPPConnection connection) { // Login must have been done before passing in connection. if (!connection.isAuthenticated()) { diff --git a/smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/packet/RosterExchange.java b/smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/packet/RosterExchange.java index 291393660..6ee6771f1 100644 --- a/smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/packet/RosterExchange.java +++ b/smack-legacy/src/main/java/org/jivesoftware/smackx/xroster/packet/RosterExchange.java @@ -70,6 +70,7 @@ public class RosterExchange implements ExtensionElement { * * @param roster the roster to send to other XMPP entity. */ + @SuppressWarnings("this-escape") public RosterExchange(Roster roster) { // Add all the roster entries to the new RosterExchange for (RosterEntry rosterEntry : roster.getEntries()) { diff --git a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java b/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java index aef1b27f0..8b4602553 100644 --- a/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java +++ b/smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java @@ -294,6 +294,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection { * * @param config the connection configuration. */ + @SuppressWarnings("this-escape") public XMPPTCPConnection(XMPPTCPConnectionConfiguration config) { super(config); this.config = config;