1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 03:52:06 +01:00

[github ci] Build also with Java 21

This commit is contained in:
Florian Schmaus 2024-09-25 15:15:04 +02:00
parent 348a3ab091
commit 2eddf1949a
72 changed files with 99 additions and 17 deletions

View file

@ -11,8 +11,9 @@ jobs:
matrix: matrix:
java: java:
- 17 - 17
- 21
env: env:
PRIMARY_JAVA_VERSION: 17 PRIMARY_JAVA_VERSION: 21
steps: steps:
- name: Checkout - name: Checkout

View file

@ -388,6 +388,7 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
* *
* @param configuration The configuration which is used to establish the connection. * @param configuration The configuration which is used to establish the connection.
*/ */
@SuppressWarnings("this-escape")
protected AbstractXMPPConnection(ConnectionConfiguration configuration) { protected AbstractXMPPConnection(ConnectionConfiguration configuration) {
saslAuthentication = new SASLAuthentication(this, configuration); saslAuthentication = new SASLAuthentication(this, configuration);
config = configuration; config = configuration;

View file

@ -672,6 +672,7 @@ public abstract class ConnectionConfiguration {
private boolean compressionEnabled = false; private boolean compressionEnabled = false;
private StanzaIdSourceFactory stanzaIdSourceFactory = new StandardStanzaIdSource.Factory(); private StanzaIdSourceFactory stanzaIdSourceFactory = new StandardStanzaIdSource.Factory();
@SuppressWarnings("this-escape")
protected Builder() { protected Builder() {
if (SmackConfiguration.DEBUG) { if (SmackConfiguration.DEBUG) {
enableDefaultDebugger(); enableDefaultDebugger();

View file

@ -658,6 +658,7 @@ public final class ModularXmppClientToServerConnection extends AbstractXMPPConne
updateOutgoingStreamXmlEnvironmentOnStreamOpen(streamOpen); updateOutgoingStreamXmlEnvironmentOnStreamOpen(streamOpen);
} }
@SuppressWarnings("this-escape")
public static class DisconnectedStateDescriptor extends StateDescriptor { public static class DisconnectedStateDescriptor extends StateDescriptor {
protected DisconnectedStateDescriptor() { protected DisconnectedStateDescriptor() {
super(DisconnectedState.class, StateDescriptor.Property.finalState); super(DisconnectedState.class, StateDescriptor.Property.finalState);

View file

@ -1,6 +1,6 @@
/** /**
* *
* Copyright © 2014-2023 Florian Schmaus * Copyright © 2014-2024 Florian Schmaus
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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. // TODO: Deprecate when stanza builder and parsing logic is ready.
@SuppressWarnings("this-escape")
public EmptyResultIQ() { public EmptyResultIQ() {
super((String) null, null); super((String) null, null);
setType(IQ.Type.result); setType(IQ.Type.result);

View file

@ -88,7 +88,7 @@ public abstract class IQ extends Stanza implements IqView {
} }
@Override @Override
public Type getType() { public final Type getType() {
return type; return type;
} }

View file

@ -39,6 +39,7 @@ public class Session extends SimpleIQ {
public static final String ELEMENT = "session"; public static final String ELEMENT = "session";
public static final String NAMESPACE = "urn:ietf:params:xml:ns:xmpp-session"; public static final String NAMESPACE = "urn:ietf:params:xml:ns:xmpp-session";
@SuppressWarnings("this-escape")
public Session() { public Session() {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
setType(IQ.Type.set); setType(IQ.Type.set);

View file

@ -203,7 +203,7 @@ public abstract class Stanza implements StanzaView, TopLevelStreamElement {
* @param to who the packet is being sent to. * @param to who the packet is being sent to.
*/ */
// TODO: Mark this as deprecated once StanzaBuilder is ready and all call sites are gone. // 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; this.to = to;
} }

View file

@ -41,6 +41,7 @@ public class ProxyInfo {
private ProxyType proxyType; private ProxyType proxyType;
private final ProxySocketConnection proxySocketConnection; private final ProxySocketConnection proxySocketConnection;
@SuppressWarnings("this-escape")
public ProxyInfo(ProxyType pType, String pHost, int pPort, String pUser, public ProxyInfo(ProxyType pType, String pHost, int pPort, String pUser,
String pPass) { String pPass) {
this.proxyType = pType; this.proxyType = pType;

View file

@ -47,6 +47,7 @@ public class XmlStringBuilder implements Appendable, CharSequence, Element {
this(pe, null); this(pe, null);
} }
@SuppressWarnings("this-escape")
public XmlStringBuilder(NamedElement e) { public XmlStringBuilder(NamedElement e) {
this(); this();
halfOpenElement(e.getElementName()); halfOpenElement(e.getElementName());
@ -56,6 +57,7 @@ public class XmlStringBuilder implements Appendable, CharSequence, Element {
this(element.getElementName(), element.getNamespace(), element.getLanguage(), enclosingXmlEnvironment); this(element.getElementName(), element.getNamespace(), element.getLanguage(), enclosingXmlEnvironment);
} }
@SuppressWarnings("this-escape")
public XmlStringBuilder(String elementName, String xmlNs, String xmlLang, XmlEnvironment enclosingXmlEnvironment) { public XmlStringBuilder(String elementName, String xmlNs, String xmlLang, XmlEnvironment enclosingXmlEnvironment) {
sb = new LazyStringBuilder(); sb = new LazyStringBuilder();
halfOpenElement(elementName); halfOpenElement(elementName);

View file

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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) { public DummyConnection(DummyConnectionConfiguration configuration) {
super(configuration); super(configuration);

View file

@ -178,6 +178,7 @@ public class EnhancedDebugger extends SmackDebugger {
JTabbedPane tabbedPane; JTabbedPane tabbedPane;
@SuppressWarnings("this-escape")
public EnhancedDebugger(XMPPConnection connection) { public EnhancedDebugger(XMPPConnection connection) {
super(connection); super(connection);

View file

@ -1,6 +1,6 @@
/** /**
* *
* Copyright © 2014 Florian Schmaus * Copyright © 2014-2024 Florian Schmaus
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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 class Enable extends SimpleIQ {
public static final String ELEMENT = "enable"; public static final String ELEMENT = "enable";
@SuppressWarnings("this-escape")
public Enable() { public Enable() {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
setType(Type.set); setType(Type.set);
@ -37,6 +38,7 @@ public class Carbon {
public static class Disable extends SimpleIQ { public static class Disable extends SimpleIQ {
public static final String ELEMENT = "disable"; public static final String ELEMENT = "disable";
@SuppressWarnings("this-escape")
public Disable() { public Disable() {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
setType(Type.set); setType(Type.set);

View file

@ -1,6 +1,6 @@
/** /**
* *
* Copyright 2019 Florian Schmaus * Copyright 2019-2024 Florian Schmaus
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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)); this(new DnsMessage(dnsMessage));
} }
@SuppressWarnings("this-escape")
public DnsIq(DnsMessage dnsQuery, Jid to) { public DnsIq(DnsMessage dnsQuery, Jid to) {
this(dnsQuery); this(dnsQuery);
setTo(to); setTo(to);

View file

@ -46,6 +46,7 @@ public class Slot extends IQ {
this(putUrl, getUrl, headers, NAMESPACE); this(putUrl, getUrl, headers, NAMESPACE);
} }
@SuppressWarnings("this-escape")
protected Slot(URL putUrl, URL getUrl, Map<String, String> headers, String namespace) { protected Slot(URL putUrl, URL getUrl, Map<String, String> headers, String namespace) {
super(ELEMENT, namespace); super(ELEMENT, namespace);
setType(Type.result); setType(Type.result);

View file

@ -53,6 +53,7 @@ public class SlotRequest extends IQ {
this(uploadServiceAddress, filename, size, contentType, NAMESPACE); this(uploadServiceAddress, filename, size, contentType, NAMESPACE);
} }
@SuppressWarnings("this-escape")
protected SlotRequest(DomainBareJid uploadServiceAddress, String filename, long size, String contentType, String namespace) { protected SlotRequest(DomainBareJid uploadServiceAddress, String filename, long size, String contentType, String namespace) {
super(ELEMENT, namespace); super(ELEMENT, namespace);

View file

@ -1,6 +1,6 @@
/** /**
* *
* Copyright © 2016-2017 Florian Schmaus * Copyright © 2016-2024 Florian Schmaus
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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> setData; private final Collection<SetData> setData;
@SuppressWarnings("this-escape")
public IoTSetRequest(Collection<? extends SetData> setData) { public IoTSetRequest(Collection<? extends SetData> setData) {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
setType(Type.set); setType(Type.set);

View file

@ -1,6 +1,6 @@
/** /**
* *
* Copyright © 2016 Florian Schmaus * Copyright © 2016-2024 Florian Schmaus
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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; private final boolean queued;
@SuppressWarnings("this-escape")
public IoTDataReadOutAccepted(int seqNr, boolean queued) { public IoTDataReadOutAccepted(int seqNr, boolean queued) {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
this.seqNr = seqNr; this.seqNr = seqNr;
@ -37,6 +38,7 @@ public class IoTDataReadOutAccepted extends IQ {
setType(Type.result); setType(Type.result);
} }
@SuppressWarnings("this-escape")
public IoTDataReadOutAccepted(IoTDataRequest dataRequest) { public IoTDataReadOutAccepted(IoTDataRequest dataRequest) {
this(dataRequest.getSequenceNr(), false); this(dataRequest.getSequenceNr(), false);
setStanzaId(dataRequest.getStanzaId()); setStanzaId(dataRequest.getStanzaId());

View file

@ -1,6 +1,6 @@
/** /**
* *
* Copyright 2016 Florian Schmaus * Copyright 2016-2024 Florian Schmaus
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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; private final NodeInfo nodeInfo;
@SuppressWarnings("this-escape")
public IoTUnregister(NodeInfo nodeInfo) { public IoTUnregister(NodeInfo nodeInfo) {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
this.nodeInfo = nodeInfo; this.nodeInfo = nodeInfo;

View file

@ -1,6 +1,6 @@
/** /**
* *
* Copyright © 2016 Florian Schmaus * Copyright © 2016-2024 Florian Schmaus
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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 ELEMENT = "clearCache";
public static final String NAMESPACE = Constants.IOT_PROVISIONING_NAMESPACE; public static final String NAMESPACE = Constants.IOT_PROVISIONING_NAMESPACE;
@SuppressWarnings("this-escape")
public ClearCache() { public ClearCache() {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
// <clearCache/> IQs are always of type 'get' (XEP-0324 § 3.5.1, see also the XEPs history remarks) // <clearCache/> IQs are always of type 'get' (XEP-0324 § 3.5.1, see also the XEPs history remarks)

View file

@ -1,6 +1,6 @@
/** /**
* *
* Copyright © 2016 Florian Schmaus * Copyright © 2016-2024 Florian Schmaus
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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 ELEMENT = "clearCacheResponse";
public static final String NAMESPACE = Constants.IOT_PROVISIONING_NAMESPACE; public static final String NAMESPACE = Constants.IOT_PROVISIONING_NAMESPACE;
@SuppressWarnings("this-escape")
public ClearCacheResponse() { public ClearCacheResponse() {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
// <clearCacheResponse/> IQs are always of type 'result' (XEP-0324 § 3.5.1, see also the XEPs history remarks) // <clearCacheResponse/> IQs are always of type 'result' (XEP-0324 § 3.5.1, see also the XEPs history remarks)
setType(Type.result); setType(Type.result);
} }
@SuppressWarnings("this-escape")
public ClearCacheResponse(ClearCache clearCacheRequest) { public ClearCacheResponse(ClearCache clearCacheRequest) {
this(); this();
setStanzaId(clearCacheRequest.getStanzaId()); setStanzaId(clearCacheRequest.getStanzaId());

View file

@ -81,6 +81,7 @@ public class MamPrefsIQ extends IQ {
* @param neverJids TODO javadoc me please * @param neverJids TODO javadoc me please
* @param defaultBehavior TODO javadoc me please * @param defaultBehavior TODO javadoc me please
*/ */
@SuppressWarnings("this-escape")
public MamPrefsIQ(MamVersion version, List<Jid> alwaysJids, List<Jid> neverJids, DefaultBehavior defaultBehavior) { public MamPrefsIQ(MamVersion version, List<Jid> alwaysJids, List<Jid> neverJids, DefaultBehavior defaultBehavior) {
super(ELEMENT, version.getNamespace()); super(ELEMENT, version.getNamespace());
setType(Type.set); setType(Type.set);

View file

@ -45,6 +45,7 @@ public class MamQueryIQ extends IQ {
* @param version TODO javadoc me please * @param version TODO javadoc me please
* @param queryId TODO javadoc me please * @param queryId TODO javadoc me please
*/ */
@SuppressWarnings("this-escape")
public MamQueryIQ(MamVersion version, String queryId) { public MamQueryIQ(MamVersion version, String queryId) {
this(version, queryId, null, null); this(version, queryId, null, null);
setType(IQ.Type.get); setType(IQ.Type.get);
@ -79,6 +80,7 @@ public class MamQueryIQ extends IQ {
* @param node TODO javadoc me please * @param node TODO javadoc me please
* @param dataForm TODO javadoc me please * @param dataForm TODO javadoc me please
*/ */
@SuppressWarnings("this-escape")
public MamQueryIQ(MamVersion version, String queryId, String node, DataForm dataForm) { public MamQueryIQ(MamVersion version, String queryId, String node, DataForm dataForm) {
super(ELEMENT, version.getNamespace()); super(ELEMENT, version.getNamespace());
this.queryId = queryId; this.queryId = queryId;

View file

@ -48,6 +48,7 @@ public class MUCLightAffiliationsIQ extends IQ {
* @param version TODO javadoc me please * @param version TODO javadoc me please
* @param affiliations TODO javadoc me please * @param affiliations TODO javadoc me please
*/ */
@SuppressWarnings("this-escape")
public MUCLightAffiliationsIQ(String version, HashMap<Jid, MUCLightAffiliation> affiliations) { public MUCLightAffiliationsIQ(String version, HashMap<Jid, MUCLightAffiliation> affiliations) {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
this.version = version; this.version = version;

View file

@ -47,6 +47,7 @@ public class MUCLightChangeAffiliationsIQ extends IQ {
* @param room TODO javadoc me please * @param room TODO javadoc me please
* @param affiliations TODO javadoc me please * @param affiliations TODO javadoc me please
*/ */
@SuppressWarnings("this-escape")
public MUCLightChangeAffiliationsIQ(Jid room, HashMap<Jid, MUCLightAffiliation> affiliations) { public MUCLightChangeAffiliationsIQ(Jid room, HashMap<Jid, MUCLightAffiliation> affiliations) {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
this.setType(Type.set); this.setType(Type.set);

View file

@ -53,6 +53,7 @@ public class MUCLightCreateIQ extends IQ {
* @param customConfigs TODO javadoc me please * @param customConfigs TODO javadoc me please
* @param occupants TODO javadoc me please * @param occupants TODO javadoc me please
*/ */
@SuppressWarnings("this-escape")
public MUCLightCreateIQ(EntityJid room, String roomName, String subject, HashMap<String, String> customConfigs, public MUCLightCreateIQ(EntityJid room, String roomName, String subject, HashMap<String, String> customConfigs,
List<Jid> occupants) { List<Jid> occupants) {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);

View file

@ -38,6 +38,7 @@ public class MUCLightDestroyIQ extends IQ {
* *
* @param roomJid TODO javadoc me please * @param roomJid TODO javadoc me please
*/ */
@SuppressWarnings("this-escape")
public MUCLightDestroyIQ(Jid roomJid) { public MUCLightDestroyIQ(Jid roomJid) {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
this.setType(Type.set); this.setType(Type.set);

View file

@ -41,6 +41,7 @@ public class MUCLightGetAffiliationsIQ extends IQ {
* @param roomJid TODO javadoc me please * @param roomJid TODO javadoc me please
* @param version TODO javadoc me please * @param version TODO javadoc me please
*/ */
@SuppressWarnings("this-escape")
public MUCLightGetAffiliationsIQ(Jid roomJid, String version) { public MUCLightGetAffiliationsIQ(Jid roomJid, String version) {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
this.version = version; this.version = version;

View file

@ -41,6 +41,7 @@ public class MUCLightGetConfigsIQ extends IQ {
* @param roomJid TODO javadoc me please * @param roomJid TODO javadoc me please
* @param version TODO javadoc me please * @param version TODO javadoc me please
*/ */
@SuppressWarnings("this-escape")
public MUCLightGetConfigsIQ(Jid roomJid, String version) { public MUCLightGetConfigsIQ(Jid roomJid, String version) {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
this.version = version; this.version = version;

View file

@ -41,6 +41,7 @@ public class MUCLightGetInfoIQ extends IQ {
* @param roomJid TODO javadoc me please * @param roomJid TODO javadoc me please
* @param version TODO javadoc me please * @param version TODO javadoc me please
*/ */
@SuppressWarnings("this-escape")
public MUCLightGetInfoIQ(Jid roomJid, String version) { public MUCLightGetInfoIQ(Jid roomJid, String version) {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
this.version = version; this.version = version;

View file

@ -49,6 +49,7 @@ public class MUCLightSetConfigsIQ extends IQ {
* @param subject TODO javadoc me please * @param subject TODO javadoc me please
* @param customConfigs TODO javadoc me please * @param customConfigs TODO javadoc me please
*/ */
@SuppressWarnings("this-escape")
public MUCLightSetConfigsIQ(Jid roomJid, String roomName, String subject, HashMap<String, String> customConfigs) { public MUCLightSetConfigsIQ(Jid roomJid, String roomName, String subject, HashMap<String, String> customConfigs) {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
this.roomName = roomName; this.roomName = roomName;

View file

@ -43,6 +43,7 @@ public class DisablePushNotificationsIQ extends IQ {
private final Jid jid; private final Jid jid;
private final String node; private final String node;
@SuppressWarnings("this-escape")
public DisablePushNotificationsIQ(Jid jid, String node) { public DisablePushNotificationsIQ(Jid jid, String node) {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
this.jid = jid; this.jid = jid;

View file

@ -53,6 +53,7 @@ public class EnablePushNotificationsIQ extends IQ {
private final String node; private final String node;
private final HashMap<String, String> publishOptions; private final HashMap<String, String> publishOptions;
@SuppressWarnings("this-escape")
public EnablePushNotificationsIQ(Jid jid, String node, HashMap<String, String> publishOptions) { public EnablePushNotificationsIQ(Jid jid, String node, HashMap<String, String> publishOptions) {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
this.jid = jid; this.jid = jid;

View file

@ -51,6 +51,7 @@ public class BlockContactsIQ extends IQ {
* *
* @param jids TODO javadoc me please * @param jids TODO javadoc me please
*/ */
@SuppressWarnings("this-escape")
public BlockContactsIQ(List<Jid> jids) { public BlockContactsIQ(List<Jid> jids) {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
this.setType(Type.set); this.setType(Type.set);

View file

@ -52,6 +52,7 @@ public class UnblockContactsIQ extends IQ {
* *
* @param jids TODO javadoc me please * @param jids TODO javadoc me please
*/ */
@SuppressWarnings("this-escape")
public UnblockContactsIQ(List<Jid> jids) { public UnblockContactsIQ(List<Jid> jids) {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
this.setType(Type.set); this.setType(Type.set);

View file

@ -36,6 +36,7 @@ public class Close extends IQ {
* *
* @param sessionID unique session ID identifying this In-Band Bytestream * @param sessionID unique session ID identifying this In-Band Bytestream
*/ */
@SuppressWarnings("this-escape")
public Close(String sessionID) { public Close(String sessionID) {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
if (sessionID == null || "".equals(sessionID)) { if (sessionID == null || "".equals(sessionID)) {

View file

@ -34,6 +34,7 @@ public class Data extends IQ {
* *
* @param data data stanza extension containing the encoded data * @param data data stanza extension containing the encoded data
*/ */
@SuppressWarnings("this-escape")
public Data(DataPacketExtension data) { public Data(DataPacketExtension data) {
super(DataPacketExtension.ELEMENT, DataPacketExtension.NAMESPACE); super(DataPacketExtension.ELEMENT, DataPacketExtension.NAMESPACE);
if (data == null) { if (data == null) {

View file

@ -54,6 +54,7 @@ public class Open extends IQ {
* @param blockSize block size in which the data will be fragmented * @param blockSize block size in which the data will be fragmented
* @param stanza stanza type used to encapsulate the data * @param stanza stanza type used to encapsulate the data
*/ */
@SuppressWarnings("this-escape")
public Open(String sessionID, int blockSize, StanzaType stanza) { public Open(String sessionID, int blockSize, StanzaType stanza) {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
if (sessionID == null || "".equals(sessionID)) { if (sessionID == null || "".equals(sessionID)) {

View file

@ -149,6 +149,7 @@ public class Socks5Proxy {
* *
* @param serverSocket the server socket to use * @param serverSocket the server socket to use
*/ */
@SuppressWarnings("this-escape")
protected Socks5Proxy(ServerSocket serverSocket) { protected Socks5Proxy(ServerSocket serverSocket) {
this.serverProcess = new Socks5ServerProcess(); this.serverProcess = new Socks5ServerProcess();
this.serverSocket = serverSocket; this.serverSocket = serverSocket;

View file

@ -68,6 +68,7 @@ public class Bytestream extends IQ {
* @param SID The session ID related to the negotiation. * @param SID The session ID related to the negotiation.
* @see #setSessionID(String) * @see #setSessionID(String)
*/ */
@SuppressWarnings("this-escape")
public Bytestream(final String SID) { public Bytestream(final String SID) {
this(); this();
setSessionID(SID); setSessionID(SID);

View file

@ -57,6 +57,7 @@ public abstract class AdHocCommandHandler extends AbstractAdHocCommand {
*/ */
private int currentStage; private int currentStage;
@SuppressWarnings("this-escape")
public AdHocCommandHandler(String node, String name, String sessionId) { public AdHocCommandHandler(String node, String name, String sessionId) {
super(node, name); super(node, name);
setSessionId(sessionId); setSessionId(sessionId);

View file

@ -45,11 +45,13 @@ public class LastActivity extends IQ {
public long lastActivity = -1; public long lastActivity = -1;
public String message; public String message;
@SuppressWarnings("this-escape")
public LastActivity() { public LastActivity() {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
setType(IQ.Type.get); setType(IQ.Type.get);
} }
@SuppressWarnings("this-escape")
public LastActivity(Jid to) { public LastActivity(Jid to) {
this(); this();
setTo(to); setTo(to);

View file

@ -1,6 +1,6 @@
/** /**
* *
* Copyright © 2014 Florian Schmaus * Copyright 2014-2024 Florian Schmaus
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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 getElement;
private final String getNamespace; private final String getNamespace;
@SuppressWarnings("this-escape")
public PrivateDataIQ(PrivateData privateData) { public PrivateDataIQ(PrivateData privateData) {
this(privateData, null, null); this(privateData, null, null);
setType(Type.set); setType(Type.set);
} }
@SuppressWarnings("this-escape")
public PrivateDataIQ(String element, String namespace) { public PrivateDataIQ(String element, String namespace) {
this(null, element, namespace); this(null, element, namespace);
setType(Type.get); setType(Type.get);

View file

@ -30,6 +30,7 @@ public abstract class JingleTransportManager<D extends JingleContentTransport> i
private final XMPPConnection connection; private final XMPPConnection connection;
@SuppressWarnings("this-escape")
public JingleTransportManager(XMPPConnection connection) { public JingleTransportManager(XMPPConnection connection) {
this.connection = connection; this.connection = connection;
connection.addConnectionListener(this); connection.addConnectionListener(this);

View file

@ -1,6 +1,6 @@
/** /**
* *
* Copyright 2012-2019 Florian Schmaus * Copyright 2012-2024 Florian Schmaus
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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); super(ELEMENT, NAMESPACE);
} }
@SuppressWarnings("this-escape")
public Ping(Jid to) { public Ping(Jid to) {
this(); this();
setTo(to); setTo(to);

View file

@ -43,6 +43,7 @@ public class PubSub extends IQ {
super(ELEMENT, ns.getXmlns()); super(ELEMENT, ns.getXmlns());
} }
@SuppressWarnings("this-escape")
public PubSub(Jid to, Type type, PubSubNamespace ns) { public PubSub(Jid to, Type type, PubSubNamespace ns) {
super(ELEMENT, (ns == null ? PubSubNamespace.basic : ns).getXmlns()); super(ELEMENT, (ns == null ? PubSubNamespace.basic : ns).getXmlns());
setTo(to); setTo(to);

View file

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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 utc;
private final String tzo; private final String tzo;
@SuppressWarnings("this-escape")
public Time(TimeBuilder timeBuilder) { public Time(TimeBuilder timeBuilder) {
super(timeBuilder, ELEMENT, NAMESPACE); super(timeBuilder, ELEMENT, NAMESPACE);
utc = timeBuilder.getUtc(); utc = timeBuilder.getUtc();

View file

@ -49,6 +49,7 @@ public class FillableForm extends FilledForm {
private final Map<String, FormField> filledFields = new HashMap<>(); private final Map<String, FormField> filledFields = new HashMap<>();
@SuppressWarnings("this-escape")
public FillableForm(DataForm dataForm) { public FillableForm(DataForm dataForm) {
super(dataForm); super(dataForm);
if (dataForm.getType() != DataForm.Type.form) { if (dataForm.getType() != DataForm.Type.form) {

View file

@ -1,6 +1,6 @@
/** /**
* *
* Copyright 2015-2020 Florian Schmaus * Copyright 2015-2024 Florian Schmaus
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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<XMPPTCPConnection> { public class StreamManagementTest extends AbstractSmackSpecificLowLevelIntegrationTest<XMPPTCPConnection> {
@SuppressWarnings("this-escape")
public StreamManagementTest(SmackIntegrationTestEnvironment environment) throws Exception { public StreamManagementTest(SmackIntegrationTestEnvironment environment) throws Exception {
super(environment, XMPPTCPConnection.class); super(environment, XMPPTCPConnection.class);
XMPPTCPConnection connection = getSpecificUnconnectedConnection(); XMPPTCPConnection connection = getSpecificUnconnectedConnection();

View file

@ -42,6 +42,7 @@ import org.jxmpp.jid.parts.Resourcepart;
@SpecificationReference(document = "XEP-0048", version = "1.2") @SpecificationReference(document = "XEP-0048", version = "1.2")
public class MultiUserChatLowLevelIntegrationTest extends AbstractSmackLowLevelIntegrationTest { public class MultiUserChatLowLevelIntegrationTest extends AbstractSmackLowLevelIntegrationTest {
@SuppressWarnings("this-escape")
public MultiUserChatLowLevelIntegrationTest(SmackIntegrationTestEnvironment environment) throws Exception { public MultiUserChatLowLevelIntegrationTest(SmackIntegrationTestEnvironment environment) throws Exception {
super(environment); super(environment);
AbstractXMPPConnection connection = getConnectedConnection(); AbstractXMPPConnection connection = getConnectedConnection();

View file

@ -43,6 +43,7 @@ public class JMFInit extends Frame implements Runnable {
private boolean visible = false; private boolean visible = false;
@SuppressWarnings("this-escape")
public JMFInit(String[] args, boolean visible) { public JMFInit(String[] args, boolean visible) {
super("Initializing JMF..."); super("Initializing JMF...");

View file

@ -53,6 +53,7 @@ public class AudioMediaSession extends JingleMediaSession {
* @param locator media locator * @param locator media locator
* @param jingleSession the jingle session. * @param jingleSession the jingle session.
*/ */
@SuppressWarnings("this-escape")
public AudioMediaSession(final PayloadType payloadType, final TransportCandidate remote, public AudioMediaSession(final PayloadType payloadType, final TransportCandidate remote,
final TransportCandidate local, String locator, JingleSession jingleSession) { final TransportCandidate local, String locator, JingleSession jingleSession) {
super(payloadType, remote, local, locator == null ? "dsound://" : locator, jingleSession); super(payloadType, remote, local, locator == null ? "dsound://" : locator, jingleSession);

View file

@ -104,6 +104,7 @@ public class AudioMediaSession extends JingleMediaSession implements MediaSessio
* @param locator media locator * @param locator media locator
* @param jingleSession the jingle session. * @param jingleSession the jingle session.
*/ */
@SuppressWarnings("this-escape")
public AudioMediaSession(final PayloadType payloadType, final TransportCandidate remote, public AudioMediaSession(final PayloadType payloadType, final TransportCandidate remote,
final TransportCandidate local, String locator, JingleSession jingleSession) { final TransportCandidate local, String locator, JingleSession jingleSession) {
super(payloadType, remote, local, locator == null ? "dsound://" : locator, jingleSession); super(payloadType, remote, local, locator == null ? "dsound://" : locator, jingleSession);

View file

@ -66,6 +66,7 @@ public class ScreenShareSession extends JingleMediaSession {
* @param locator media locator * @param locator media locator
* @param jingleSession the jingle session. * @param jingleSession the jingle session.
*/ */
@SuppressWarnings("this-escape")
public ScreenShareSession(final PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, public ScreenShareSession(final PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local,
final String locator, JingleSession jingleSession) { final String locator, JingleSession jingleSession) {
super(payloadType, remote, local, "Screen", jingleSession); super(payloadType, remote, local, "Screen", jingleSession);

View file

@ -48,6 +48,7 @@ public class ImageReceiver extends Canvas {
private int remotePort; private int remotePort;
private ImageDecoder decoder; private ImageDecoder decoder;
@SuppressWarnings("this-escape")
public ImageReceiver(final InetAddress remoteHost, final int remotePort, final int localPort, int width, int height) { public ImageReceiver(final InetAddress remoteHost, final int remotePort, final int localPort, int width, int height) {
tiles = new BufferedImage[width][height]; tiles = new BufferedImage[width][height];

View file

@ -76,7 +76,7 @@ public class OctTreeQuantizer implements Quantizer {
private int colors = 0; private int colors = 0;
private final List<Vector<OctTreeNode>> colorList; private final List<Vector<OctTreeNode>> colorList;
@SuppressWarnings("JdkObsolete") @SuppressWarnings({"JdkObsolete", "this-escape"})
public OctTreeQuantizer() { public OctTreeQuantizer() {
setup(256); setup(256);
colorList = new ArrayList<>(MAX_LEVEL + 1); colorList = new ArrayList<>(MAX_LEVEL + 1);

View file

@ -37,6 +37,7 @@ public class TestMediaSession extends JingleMediaSession {
* @param locator media locator * @param locator media locator
* @param jingleSession the jingle session. * @param jingleSession the jingle session.
*/ */
@SuppressWarnings("this-escape")
public TestMediaSession(final PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local, public TestMediaSession(final PayloadType payloadType, final TransportCandidate remote, final TransportCandidate local,
final String locator, JingleSession jingleSession) { final String locator, JingleSession jingleSession) {
super(payloadType, remote, local, "Test", jingleSession); super(payloadType, remote, local, "Test", jingleSession);

View file

@ -38,6 +38,7 @@ public class FixedResolver extends TransportResolver {
* @param ip the IP address. * @param ip the IP address.
* @param port the port number. * @param port the port number.
*/ */
@SuppressWarnings("this-escape")
public FixedResolver(String ip, int port) { public FixedResolver(String ip, int port) {
super(); super();
setFixedCandidate(ip, port); setFixedCandidate(ip, port);

View file

@ -56,6 +56,7 @@ public class ICEResolver extends TransportResolver {
static Map<String, ICENegociator> negociatorsMap = new HashMap<>(); static Map<String, ICENegociator> negociatorsMap = new HashMap<>();
// ICENegociator iceNegociator = null; // ICENegociator iceNegociator = null;
@SuppressWarnings("this-escape")
public ICEResolver(XMPPConnection connection, String server, int port) { public ICEResolver(XMPPConnection connection, String server, int port) {
super(); super();
this.connection = connection; this.connection = connection;

View file

@ -45,6 +45,7 @@ public class TcpUdpBridgeClient {
private DatagramSocket localUdpSocket; private DatagramSocket localUdpSocket;
private Socket localTcpSocket; private Socket localTcpSocket;
@SuppressWarnings("this-escape")
public TcpUdpBridgeClient(String remoteTcpHost, String remoteUdpHost, int remoteTcpPort, int remoteUdpPort) { public TcpUdpBridgeClient(String remoteTcpHost, String remoteUdpHost, int remoteTcpPort, int remoteUdpPort) {
this.remoteTcpHost = remoteTcpHost; this.remoteTcpHost = remoteTcpHost;
this.remoteUdpHost = remoteUdpHost; this.remoteUdpHost = remoteUdpHost;

View file

@ -48,6 +48,7 @@ public class TcpUdpBridgeServer {
private Socket localTcpSocket; private Socket localTcpSocket;
private ServerSocket serverTcpSocket; private ServerSocket serverTcpSocket;
@SuppressWarnings("this-escape")
public TcpUdpBridgeServer(String remoteTcpHost, String remoteUdpHost, int remoteTcpPort, int remoteUdpPort) { public TcpUdpBridgeServer(String remoteTcpHost, String remoteUdpHost, int remoteTcpPort, int remoteUdpPort) {
this.remoteTcpHost = remoteTcpHost; this.remoteTcpHost = remoteTcpHost;
this.remoteUdpHost = remoteUdpHost; this.remoteUdpHost = remoteUdpHost;

View file

@ -71,6 +71,7 @@ public class Jingle extends IQ {
* @param mi the jingle content info * @param mi the jingle content info
* @param sid the sid. * @param sid the sid.
*/ */
@SuppressWarnings("this-escape")
public Jingle(final List<JingleContent> contents, final JingleContentInfo mi, public Jingle(final List<JingleContent> contents, final JingleContentInfo mi,
final String sid) { final String sid) {
this(); this();
@ -93,6 +94,7 @@ public class Jingle extends IQ {
* *
* @param content a content * @param content a content
*/ */
@SuppressWarnings("this-escape")
public Jingle(final JingleContent content) { public Jingle(final JingleContent content) {
this(); this();
@ -112,6 +114,7 @@ public class Jingle extends IQ {
* *
* @param info The content info * @param info The content info
*/ */
@SuppressWarnings("this-escape")
public Jingle(final JingleContentInfo info) { public Jingle(final JingleContentInfo info) {
this(); this();
@ -131,6 +134,7 @@ public class Jingle extends IQ {
* *
* @param action The action. * @param action The action.
*/ */
@SuppressWarnings("this-escape")
public Jingle(final JingleActionEnum action) { public Jingle(final JingleActionEnum action) {
this(null, null, null); this(null, null, null);
this.action = action; this.action = action;

View file

@ -184,6 +184,7 @@ public abstract class JingleContentDescription implements ExtensionElement {
* *
* @param pt the payload type. * @param pt the payload type.
*/ */
@SuppressWarnings("this-escape")
public Audio(final JinglePayloadType pt) { public Audio(final JinglePayloadType pt) {
super(); super();
addJinglePayloadType(pt); addJinglePayloadType(pt);

View file

@ -99,6 +99,7 @@ public class JingleContentInfo implements ExtensionElement {
public static final String NAMESPACE = "urn:xmpp:tmp:jingle:apps:rtp"; public static final String NAMESPACE = "urn:xmpp:tmp:jingle:apps:rtp";
@SuppressWarnings("this-escape")
public Audio(final ContentInfo mi) { public Audio(final ContentInfo mi) {
super(mi); super(mi);
setNamespace(NAMESPACE); setNamespace(NAMESPACE);

View file

@ -191,6 +191,7 @@ public abstract class JingleDescription implements ExtensionElement {
* *
* @param pt the payload type. * @param pt the payload type.
*/ */
@SuppressWarnings("this-escape")
public Audio(final PayloadType pt) { public Audio(final PayloadType pt) {
super(); super();
addPayloadType(pt); addPayloadType(pt);

View file

@ -55,6 +55,7 @@ public class JingleTransport implements ExtensionElement {
* *
* @param candidate A transport candidate element to add. * @param candidate A transport candidate element to add.
*/ */
@SuppressWarnings("this-escape")
public JingleTransport(final JingleTransportCandidate candidate) { public JingleTransport(final JingleTransportCandidate candidate) {
super(); super();
addCandidate(candidate); addCandidate(candidate);
@ -202,6 +203,7 @@ public class JingleTransport implements ExtensionElement {
* *
* @param candidate the jmf transport candidate * @param candidate the jmf transport candidate
*/ */
@SuppressWarnings("this-escape")
public JingleTransportCandidate(final TransportCandidate candidate) { public JingleTransportCandidate(final TransportCandidate candidate) {
super(); super();
setMediaTransport(candidate); setMediaTransport(candidate);
@ -272,6 +274,7 @@ public class JingleTransport implements ExtensionElement {
public static class Ice extends JingleTransport { public static class Ice extends JingleTransport {
public static final String NAMESPACE = "urn:xmpp:tmp:jingle:transports:ice-udp"; public static final String NAMESPACE = "urn:xmpp:tmp:jingle:transports:ice-udp";
@SuppressWarnings("this-escape")
public Ice() { public Ice() {
super(); super();
setNamespace(NAMESPACE); setNamespace(NAMESPACE);
@ -359,6 +362,7 @@ public class JingleTransport implements ExtensionElement {
public static class RawUdp extends JingleTransport { public static class RawUdp extends JingleTransport {
public static final String NAMESPACE = "http://www.xmpp.org/extensions/xep-0177.html#ns"; public static final String NAMESPACE = "http://www.xmpp.org/extensions/xep-0177.html#ns";
@SuppressWarnings("this-escape")
public RawUdp() { public RawUdp() {
super(); super();
setNamespace(NAMESPACE); setNamespace(NAMESPACE);

View file

@ -53,6 +53,7 @@ public class DepartQueuePacket extends IQ {
* @param workgroup the workgroup to depart. * @param workgroup the workgroup to depart.
* @param user the user to make depart from the queue. * @param user the user to make depart from the queue.
*/ */
@SuppressWarnings("this-escape")
public DepartQueuePacket(EntityBareJid workgroup, EntityJid user) { public DepartQueuePacket(EntityBareJid workgroup, EntityJid user) {
super("depart-queue", "http://jabber.org/protocol/workgroup"); super("depart-queue", "http://jabber.org/protocol/workgroup");
this.user = user; this.user = user;

View file

@ -22,6 +22,7 @@ public class ChatSetting {
private String value; private String value;
private int type; private int type;
@SuppressWarnings("this-escape")
public ChatSetting(String key, String value, int type) { public ChatSetting(String key, String value, int type) {
setKey(key); setKey(key);
setValue(value); setValue(value);

View file

@ -66,6 +66,7 @@ public class ChatSettings extends IQ {
settings = new ArrayList<>(); settings = new ArrayList<>();
} }
@SuppressWarnings("this-escape")
public ChatSettings(String key) { public ChatSettings(String key) {
this(); this();
setKey(key); setKey(key);

View file

@ -99,6 +99,7 @@ public class Workgroup {
* @param connection an XMPP connection which must have already undergone a * @param connection an XMPP connection which must have already undergone a
* successful login. * successful login.
*/ */
@SuppressWarnings("this-escape")
public Workgroup(EntityBareJid workgroupJID, XMPPConnection connection) { public Workgroup(EntityBareJid workgroupJID, XMPPConnection connection) {
// Login must have been done before passing in connection. // Login must have been done before passing in connection.
if (!connection.isAuthenticated()) { if (!connection.isAuthenticated()) {

View file

@ -70,6 +70,7 @@ public class RosterExchange implements ExtensionElement {
* *
* @param roster the roster to send to other XMPP entity. * @param roster the roster to send to other XMPP entity.
*/ */
@SuppressWarnings("this-escape")
public RosterExchange(Roster roster) { public RosterExchange(Roster roster) {
// Add all the roster entries to the new RosterExchange // Add all the roster entries to the new RosterExchange
for (RosterEntry rosterEntry : roster.getEntries()) { for (RosterEntry rosterEntry : roster.getEntries()) {

View file

@ -294,6 +294,7 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
* *
* @param config the connection configuration. * @param config the connection configuration.
*/ */
@SuppressWarnings("this-escape")
public XMPPTCPConnection(XMPPTCPConnectionConfiguration config) { public XMPPTCPConnection(XMPPTCPConnectionConfiguration config) {
super(config); super(config);
this.config = config; this.config = config;