Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[github ci] Build also with Java 21 #633

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ jobs:
matrix:
java:
- 17
- 21
env:
PRIMARY_JAVA_VERSION: 17
PRIMARY_JAVA_VERSION: 21

steps:
- name: Checkout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,7 @@ public void uncaughtException(Thread t, Throwable e) {
*
* @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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -672,6 +672,7 @@ public abstract static class Builder<B extends Builder<B, C>, C extends Connecti
private boolean compressionEnabled = false;
private StanzaIdSourceFactory stanzaIdSourceFactory = new StandardStanzaIdSource.Factory();

@SuppressWarnings("this-escape")
protected Builder() {
if (SmackConfiguration.DEBUG) {
enableDefaultDebugger();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -658,6 +658,7 @@ private void sendStreamOpen(AbstractStreamOpen streamOpen) throws NotConnectedEx
updateOutgoingStreamXmlEnvironmentOnStreamOpen(streamOpen);
}

@SuppressWarnings("this-escape")
public static class DisconnectedStateDescriptor extends StateDescriptor {
protected DisconnectedStateDescriptor() {
super(DisconnectedState.class, StateDescriptor.Property.finalState);
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ protected IQ(AbstractIqBuilder<?> iqBuilder, QName childElementQName) {
}

@Override
public Type getType() {
public final Type getType() {
return type;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ public final Jid getTo() {
* @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;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public enum ProxyType {
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ public XmlStringBuilder(XmlElement pe) {
this(pe, null);
}

@SuppressWarnings("this-escape")
public XmlStringBuilder(NamedElement e) {
this();
halfOpenElement(e.getElementName());
Expand All @@ -56,6 +57,7 @@ public XmlStringBuilder(XmlElement element, XmlEnvironment enclosingXmlEnvironme
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);
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -82,6 +82,7 @@ private EntityFullJid getUserJid() {
}
}

@SuppressWarnings("this-escape")
public DummyConnection(DummyConnectionConfiguration configuration) {
super(configuration);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ public class EnhancedDebugger extends SmackDebugger {

JTabbedPane tabbedPane;

@SuppressWarnings("this-escape")
public EnhancedDebugger(XMPPConnection connection) {
super(connection);

Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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);
Expand All @@ -37,6 +38,7 @@ public Enable() {
public static class Disable extends SimpleIQ {
public static final String ELEMENT = "disable";

@SuppressWarnings("this-escape")
public Disable() {
super(ELEMENT, NAMESPACE);
setType(Type.set);
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -43,6 +43,7 @@ public DnsIq(byte[] dnsMessage) throws IOException {
this(new DnsMessage(dnsMessage));
}

@SuppressWarnings("this-escape")
public DnsIq(DnsMessage dnsQuery, Jid to) {
this(dnsQuery);
setTo(to);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public Slot(URL putUrl, URL getUrl, Map<String, String> headers) {
this(putUrl, getUrl, headers, NAMESPACE);
}

@SuppressWarnings("this-escape")
protected Slot(URL putUrl, URL getUrl, Map<String, String> headers, String namespace) {
super(ELEMENT, namespace);
setType(Type.result);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public SlotRequest(DomainBareJid uploadServiceAddress, String filename, long siz
this(uploadServiceAddress, filename, size, contentType, NAMESPACE);
}

@SuppressWarnings("this-escape")
protected SlotRequest(DomainBareJid uploadServiceAddress, String filename, long size, String contentType, String namespace) {
super(ELEMENT, namespace);

Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -29,6 +29,7 @@ public class IoTSetRequest extends IQ {

private final Collection<SetData> setData;

@SuppressWarnings("this-escape")
public IoTSetRequest(Collection<? extends SetData> setData) {
super(ELEMENT, NAMESPACE);
setType(Type.set);
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -30,13 +30,15 @@ public class IoTDataReadOutAccepted extends IQ {

private final boolean queued;

@SuppressWarnings("this-escape")
public IoTDataReadOutAccepted(int seqNr, boolean queued) {
super(ELEMENT, NAMESPACE);
this.seqNr = seqNr;
this.queued = queued;
setType(Type.result);
}

@SuppressWarnings("this-escape")
public IoTDataReadOutAccepted(IoTDataRequest dataRequest) {
this(dataRequest.getSequenceNr(), false);
setStanzaId(dataRequest.getStanzaId());
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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);
// <clearCache/> IQs are always of type 'get' (XEP-0324 § 3.5.1, see also the XEPs history remarks)
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand All @@ -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);
// <clearCacheResponse/> 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());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public MamPrefsIQ(MamVersion version) {
* @param neverJids 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) {
super(ELEMENT, version.getNamespace());
setType(Type.set);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -79,6 +80,7 @@ public MamQueryIQ(MamVersion version, String queryId, DataForm form) {
* @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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Jid, MUCLightAffiliation> affiliations) {
super(ELEMENT, NAMESPACE);
this.version = version;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Jid, MUCLightAffiliation> affiliations) {
super(ELEMENT, NAMESPACE);
this.setType(Type.set);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, String> customConfigs,
List<Jid> occupants) {
super(ELEMENT, NAMESPACE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, String> customConfigs) {
super(ELEMENT, NAMESPACE);
this.roomName = roomName;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ public class EnablePushNotificationsIQ extends IQ {
private final String node;
private final HashMap<String, String> publishOptions;

@SuppressWarnings("this-escape")
public EnablePushNotificationsIQ(Jid jid, String node, HashMap<String, String> publishOptions) {
super(ELEMENT, NAMESPACE);
this.jid = jid;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ public class BlockContactsIQ extends IQ {
*
* @param jids TODO javadoc me please
*/
@SuppressWarnings("this-escape")
public BlockContactsIQ(List<Jid> jids) {
super(ELEMENT, NAMESPACE);
this.setType(Type.set);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public class UnblockContactsIQ extends IQ {
*
* @param jids TODO javadoc me please
*/
@SuppressWarnings("this-escape")
public UnblockContactsIQ(List<Jid> jids) {
super(ELEMENT, NAMESPACE);
this.setType(Type.set);
Expand Down
Loading
Loading