From 0561aaa9bc82104980f8aa0be2fa04cfd07f3e54 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Tue, 22 Oct 2024 16:09:33 +0200 Subject: [PATCH] Bump checkstyle to 10.18.2 --- ...terealtime.smack.java-common-conventions.gradle | 2 +- config/checkstyle/checkstyle.xml | 14 +++++++------- resources/eclipse/smack.importorder | 4 +++- .../ping/android/ServerPingWithAlarmManager.java | 1 + .../smack/bosh/XMPPBOSHConnection.java | 4 ++-- .../java/org/jivesoftware/smack/SmackReactor.java | 2 +- .../org/jivesoftware/smack/util/EventManger.java | 2 +- .../org/igniterealtime/smack/examples/IoT.java | 1 + .../smack/examples/WebSocketConnection.java | 3 +-- .../smack/examples/XmppConnectionTool.java | 1 + .../igniterealtime/smack/examples/XmppTools.java | 1 + .../file_metadata/element/FileMetadataElement.java | 1 + .../provider/FileMetadataElementProvider.java | 1 + .../provider/AbstractHttpOverXmppProvider.java | 2 +- .../smackx/mam/element/MamElementFactory.java | 1 + .../smackx/mam/element/MamElements.java | 1 + .../smackx/mam/element/MamV1ElementFactory.java | 2 ++ .../smackx/mam/element/MamV2ElementFactory.java | 2 ++ .../provider/ThumbnailElementProvider.java | 1 + .../file_metadata/FileMetadataElementTest.java | 1 + .../provider/ThumbnailElementProviderTest.java | 1 + .../bytestreams/ibb/InBandBytestreamSession.java | 10 +++++----- .../smackx/bytestreams/socks5/Socks5Proxy.java | 2 +- .../smackx/commands/AbstractAdHocCommand.java | 1 + .../jivesoftware/smackx/commands/AdHocCommand.java | 1 + .../smackx/commands/AdHocCommandHandler.java | 1 + .../smackx/commands/AdHocCommandResult.java | 1 + .../smackx/muc/DirectMucInvitationListener.java | 1 + .../smackx/muc/DirectMucInvitationManager.java | 1 + .../muc/provider/GroupChatInvitationProvider.java | 1 + .../smackx/softwareinfo/form/SoftwareInfoForm.java | 1 + .../smackx/xdata/FormFieldWithOptions.java | 2 +- .../socks5/Socks5ByteStreamManagerTest.java | 1 + .../socks5/Socks5ClientForInitiatorTest.java | 1 + .../jivesoftware/smackx/muc/MultiUserChatTest.java | 1 + .../muc/packet/GroupChatInvitationElementTest.java | 1 + .../smackx/receipts/DeliveryReceiptTest.java | 2 +- .../java/org/jivesoftware/smack/roster/Roster.java | 7 +++++-- .../smack/chat/ChatConnectionTest.java | 2 +- .../smack/XmppConnectionStressTest.java | 1 + .../inttest/SmackIntegrationTestFramework.java | 1 + .../smack/inttest/XmppConnectionManager.java | 2 ++ .../jivesoftware/smack/StreamManagementTest.java | 1 + .../IncomingMessageListenerIntegrationTest.java | 1 + .../OutgoingMessageListenerIntegrationTest.java | 1 + .../roster/LowLevelRosterIntegrationTest.java | 1 + .../smack/roster/RosterIntegrationTest.java | 1 + .../commands/AdHocCommandIntegrationTest.java | 1 + .../filetransfer/FileTransferIntegrationTest.java | 1 + .../geolocation/GeolocationIntegrationTest.java | 1 + .../smackx/iot/IoTControlIntegrationTest.java | 1 + .../smackx/iot/IoTDiscoveryIntegrationTest.java | 1 + .../smackx/mam/MamIntegrationTest.java | 2 ++ .../muc/AbstractMultiUserChatIntegrationTest.java | 2 ++ .../muc/MultiUserChatEntityIntegrationTest.java | 1 + .../smackx/muc/MultiUserChatIntegrationTest.java | 2 ++ .../muc/MultiUserChatLowLevelIntegrationTest.java | 1 + .../muc/MultiUserChatOccupantIntegrationTest.java | 2 ++ ...RolesAffiliationsPrivilegesIntegrationTest.java | 2 ++ .../muc/ParticipantStatusIntegrationTest.java | 1 + .../smackx/muc/UserStatusIntegrationTest.java | 2 ++ .../smackx/ox/AbstractOpenPgpIntegrationTest.java | 1 + .../ox/OXSecretKeyBackupIntegrationTest.java | 8 +++++--- .../ox_im/OXInstantMessagingIntegrationTest.java | 1 + .../smackx/ping/PingIntegrationTest.java | 1 + .../smackx/pubsub/PubSubIntegrationTest.java | 1 + .../softwareInfo/SoftwareInfoIntegrationTest.java | 1 + .../smackx/usertune/UserTuneIntegrationTest.java | 1 + .../inttest/SmackIntegrationTestFrameWorkTest.java | 10 +++++----- .../SmackIntegrationTestFrameworkUnitTest.java | 1 + .../inttest/util/MultiResultSyncPointTest.java | 2 +- .../smack/inttest/util/ResultSyncPointTest.java | 2 +- .../smack/java7/XmppHostnameVerifier.java | 2 +- .../jingleold/listeners/JingleSessionListener.java | 1 + .../listeners/JingleTransportListener.java | 1 + .../jingleold/nat/BridgedTransportManager.java | 1 + .../smackx/jingleold/nat/ICETransportManager.java | 1 + .../smackx/workgroup/agent/AgentRoster.java | 4 ++-- .../SmackOmemoSignalIntegrationTestFramework.java | 3 ++- .../smackx/omemo/CachingOmemoStore.java | 2 +- .../smackx/omemo/internal/OmemoAesCipher.java | 1 + .../smackx/omemo/util/OmemoMessageBuilder.java | 2 ++ .../smackx/omemo/WrapperObjectsTest.java | 1 + .../org/jivesoftware/smackx/ox/OpenPgpContact.java | 1 + .../org/jivesoftware/smackx/ox/OpenPgpManager.java | 1 + .../smackx/ox/crypto/OpenPgpProvider.java | 1 + .../smackx/ox/crypto/PainlessOpenPgpProvider.java | 1 + .../smackx/ox/element/OpenPgpElement.java | 2 +- .../jivesoftware/smackx/ox/OpenPgpElementTest.java | 1 + .../jivesoftware/smackx/ox/OpenPgpStoreTest.java | 1 + .../smackx/ox/PainlessOpenPgpProviderTest.java | 1 + .../jivesoftware/smackx/ox/PubSubDelegateTest.java | 1 + .../smackx/ox/PublicKeysListElementTest.java | 1 + .../smackx/ox/SecretKeyBackupHelperTest.java | 1 + .../smackx/ox/SecretkeyElementTest.java | 1 + .../ox_im/OXInstantMessagingManagerTest.java | 1 + .../minidns/DnsOverXmppMiniDnsResolverTest.java | 2 +- .../XmppWebSocketTransportModuleTest.java | 1 - .../test/WebSocketFactoryServiceTestUtil.java | 1 - 99 files changed, 134 insertions(+), 46 deletions(-) diff --git a/build-logic/src/main/groovy/org.igniterealtime.smack.java-common-conventions.gradle b/build-logic/src/main/groovy/org.igniterealtime.smack.java-common-conventions.gradle index 0106d925e6..dc82489abb 100644 --- a/build-logic/src/main/groovy/org.igniterealtime.smack.java-common-conventions.gradle +++ b/build-logic/src/main/groovy/org.igniterealtime.smack.java-common-conventions.gradle @@ -156,7 +156,7 @@ jar { } checkstyle { - toolVersion = '8.27' + toolVersion = '10.18.2' if (project in gplLicensedProjects) { configProperties.checkstyleLicenseHeader = "${project.name}-gplv3-license-header" diff --git a/config/checkstyle/checkstyle.xml b/config/checkstyle/checkstyle.xml index ce6b4200d6..31df0a8f09 100644 --- a/config/checkstyle/checkstyle.xml +++ b/config/checkstyle/checkstyle.xml @@ -104,7 +104,7 @@ - + @@ -195,15 +195,15 @@ , TYPE_EXTENSION_AND "/> - - - - - + + + + + diff --git a/resources/eclipse/smack.importorder b/resources/eclipse/smack.importorder index f87892a1ca..2b5f1dadf3 100644 --- a/resources/eclipse/smack.importorder +++ b/resources/eclipse/smack.importorder @@ -1,6 +1,8 @@ #Organize Import Order #Wed Jun 14 16:42:40 CEST 2017 -5= +7= +6=org.igniterealtime.smackx +5=org.igniterealtime.smack 4=org.jivesoftware.smackx 3=org.jivesoftware.smack 2=javax diff --git a/smack-android-extensions/src/main/java/org/jivesoftware/smackx/ping/android/ServerPingWithAlarmManager.java b/smack-android-extensions/src/main/java/org/jivesoftware/smackx/ping/android/ServerPingWithAlarmManager.java index 1450982812..b8d3cde5b5 100644 --- a/smack-android-extensions/src/main/java/org/jivesoftware/smackx/ping/android/ServerPingWithAlarmManager.java +++ b/smack-android-extensions/src/main/java/org/jivesoftware/smackx/ping/android/ServerPingWithAlarmManager.java @@ -28,6 +28,7 @@ import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPConnectionRegistry; import org.jivesoftware.smack.util.Async; + import org.jivesoftware.smackx.ping.PingManager; import android.app.AlarmManager; diff --git a/smack-bosh/src/main/java/org/jivesoftware/smack/bosh/XMPPBOSHConnection.java b/smack-bosh/src/main/java/org/jivesoftware/smack/bosh/XMPPBOSHConnection.java index f1c0b90155..e011e10abe 100644 --- a/smack-bosh/src/main/java/org/jivesoftware/smack/bosh/XMPPBOSHConnection.java +++ b/smack-bosh/src/main/java/org/jivesoftware/smack/bosh/XMPPBOSHConnection.java @@ -499,7 +499,7 @@ protected void afterSaslAuthenticationSuccess() * * @author Guenther Niess */ - private class BOSHConnectionListener implements BOSHClientConnListener { + private final class BOSHConnectionListener implements BOSHClientConnListener { /** * Notify the BOSHConnection about connection state changes. @@ -556,7 +556,7 @@ public void connectionEvent(BOSHClientConnEvent connEvent) { * * @author Guenther Niess */ - private class BOSHPacketReader implements BOSHClientResponseListener { + private final class BOSHPacketReader implements BOSHClientResponseListener { /** * Parse the received packets and notify the corresponding connection. diff --git a/smack-core/src/main/java/org/jivesoftware/smack/SmackReactor.java b/smack-core/src/main/java/org/jivesoftware/smack/SmackReactor.java index 8fc59ab3a5..504e381033 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/SmackReactor.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/SmackReactor.java @@ -164,7 +164,7 @@ boolean cancel(ScheduledAction scheduledAction) { return scheduledActions.remove(scheduledAction); } - private class Reactor extends Thread { + private final class Reactor extends Thread { private volatile long shutdownRequestTimestamp = -1; diff --git a/smack-core/src/main/java/org/jivesoftware/smack/util/EventManger.java b/smack-core/src/main/java/org/jivesoftware/smack/util/EventManger.java index f4750423ea..109869bcd9 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/util/EventManger.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/util/EventManger.java @@ -87,7 +87,7 @@ public boolean signalEvent(K eventKey, R eventResult) { return true; } - private static class Reference { + private static final class Reference { volatile V eventResult; } diff --git a/smack-examples/src/main/java/org/igniterealtime/smack/examples/IoT.java b/smack-examples/src/main/java/org/igniterealtime/smack/examples/IoT.java index 12c74fb2a8..34d7bc36bd 100644 --- a/smack-examples/src/main/java/org/igniterealtime/smack/examples/IoT.java +++ b/smack-examples/src/main/java/org/igniterealtime/smack/examples/IoT.java @@ -49,6 +49,7 @@ import org.jivesoftware.smackx.iot.provisioning.IoTProvisioningManager; import org.igniterealtime.smack.inttest.util.SimpleResultSyncPoint; + import org.jxmpp.jid.BareJid; import org.jxmpp.jid.EntityBareJid; import org.jxmpp.jid.impl.JidCreate; diff --git a/smack-examples/src/main/java/org/igniterealtime/smack/examples/WebSocketConnection.java b/smack-examples/src/main/java/org/igniterealtime/smack/examples/WebSocketConnection.java index 9e4e5856fa..bed50f8b4a 100644 --- a/smack-examples/src/main/java/org/igniterealtime/smack/examples/WebSocketConnection.java +++ b/smack-examples/src/main/java/org/igniterealtime/smack/examples/WebSocketConnection.java @@ -1,6 +1,6 @@ /** * - * Copyright 2021 Florian Schmaus + * Copyright 2021-2024 Florian Schmaus * * This file is part of smack-examples. * @@ -25,7 +25,6 @@ import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPException; - import org.jivesoftware.smack.c2s.ModularXmppClientToServerConnection; import org.jivesoftware.smack.c2s.ModularXmppClientToServerConnectionConfiguration; import org.jivesoftware.smack.util.TLSUtils; diff --git a/smack-examples/src/main/java/org/igniterealtime/smack/examples/XmppConnectionTool.java b/smack-examples/src/main/java/org/igniterealtime/smack/examples/XmppConnectionTool.java index c44adb1570..18c287e11c 100644 --- a/smack-examples/src/main/java/org/igniterealtime/smack/examples/XmppConnectionTool.java +++ b/smack-examples/src/main/java/org/igniterealtime/smack/examples/XmppConnectionTool.java @@ -31,6 +31,7 @@ import org.jivesoftware.smack.c2s.ModularXmppClientToServerConnectionConfiguration; import org.jivesoftware.smack.debugger.ConsoleDebugger; import org.jivesoftware.smack.debugger.SmackDebuggerFactory; + import org.jivesoftware.smackx.omemo.util.OmemoConstants; import org.jivesoftware.smackx.pep.PepManager; import org.jivesoftware.smackx.pubsub.PubSubManager; diff --git a/smack-examples/src/main/java/org/igniterealtime/smack/examples/XmppTools.java b/smack-examples/src/main/java/org/igniterealtime/smack/examples/XmppTools.java index 70bb9f1f29..49da3e518b 100644 --- a/smack-examples/src/main/java/org/igniterealtime/smack/examples/XmppTools.java +++ b/smack-examples/src/main/java/org/igniterealtime/smack/examples/XmppTools.java @@ -37,6 +37,7 @@ import org.jivesoftware.smack.tcp.XMPPTCPConnection; import org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration; import org.jivesoftware.smack.util.TLSUtils; + import org.jivesoftware.smackx.disco.ServiceDiscoveryManager; import org.jivesoftware.smackx.iqregister.AccountManager; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/file_metadata/element/FileMetadataElement.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/file_metadata/element/FileMetadataElement.java index e9f2976bbf..dfc5f55cb6 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/file_metadata/element/FileMetadataElement.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/file_metadata/element/FileMetadataElement.java @@ -32,6 +32,7 @@ import org.jivesoftware.smack.util.HashCode; import org.jivesoftware.smack.util.StringUtils; import org.jivesoftware.smack.util.XmlStringBuilder; + import org.jivesoftware.smackx.hashes.HashManager; import org.jivesoftware.smackx.hashes.element.HashElement; import org.jivesoftware.smackx.thumbnails.element.ThumbnailElement; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/file_metadata/provider/FileMetadataElementProvider.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/file_metadata/provider/FileMetadataElementProvider.java index e4212b0cec..cc268b4f53 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/file_metadata/provider/FileMetadataElementProvider.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/file_metadata/provider/FileMetadataElementProvider.java @@ -25,6 +25,7 @@ import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParserException; + import org.jivesoftware.smackx.file_metadata.element.FileMetadataElement; import org.jivesoftware.smackx.hashes.element.HashElement; import org.jivesoftware.smackx.hashes.provider.HashElementProvider; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/hoxt/provider/AbstractHttpOverXmppProvider.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/hoxt/provider/AbstractHttpOverXmppProvider.java index 8efcb0dfea..93dde8746a 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/hoxt/provider/AbstractHttpOverXmppProvider.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/hoxt/provider/AbstractHttpOverXmppProvider.java @@ -160,7 +160,7 @@ private static AbstractHttpOverXmpp.Xml parseXml(XmlPullParser parser) while (!done) { XmlPullParser.Event eventType = parser.next(); - if ((eventType == XmlPullParser.Event.END_ELEMENT) && parser.getName().equals(ELEMENT_XML)) { + if (eventType == XmlPullParser.Event.END_ELEMENT && parser.getName().equals(ELEMENT_XML)) { done = true; } else { // just write everything else as text diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamElementFactory.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamElementFactory.java index 6b0017bbc1..78025f364f 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamElementFactory.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamElementFactory.java @@ -20,6 +20,7 @@ import org.jivesoftware.smack.packet.Message; import org.jivesoftware.smack.xml.XmlPullParser; + import org.jivesoftware.smackx.forward.packet.Forwarded; import org.jivesoftware.smackx.rsm.packet.RSMSet; import org.jivesoftware.smackx.xdata.packet.DataForm; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamElements.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamElements.java index 6e3d7e9822..dae64f4c15 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamElements.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamElements.java @@ -25,6 +25,7 @@ import org.jivesoftware.smack.packet.XmlElement; import org.jivesoftware.smack.util.StringUtils; import org.jivesoftware.smack.util.XmlStringBuilder; + import org.jivesoftware.smackx.forward.packet.Forwarded; import org.jxmpp.jid.Jid; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamV1ElementFactory.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamV1ElementFactory.java index e87f79ca75..7e8ce0c2d0 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamV1ElementFactory.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamV1ElementFactory.java @@ -17,9 +17,11 @@ package org.jivesoftware.smackx.mam.element; import java.util.List; + import javax.xml.namespace.QName; import org.jivesoftware.smack.packet.Message; + import org.jivesoftware.smackx.forward.packet.Forwarded; import org.jivesoftware.smackx.rsm.packet.RSMSet; import org.jivesoftware.smackx.xdata.packet.DataForm; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamV2ElementFactory.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamV2ElementFactory.java index a706f86321..092c4e3297 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamV2ElementFactory.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/mam/element/MamV2ElementFactory.java @@ -17,9 +17,11 @@ package org.jivesoftware.smackx.mam.element; import java.util.List; + import javax.xml.namespace.QName; import org.jivesoftware.smack.packet.Message; + import org.jivesoftware.smackx.forward.packet.Forwarded; import org.jivesoftware.smackx.rsm.packet.RSMSet; import org.jivesoftware.smackx.xdata.packet.DataForm; diff --git a/smack-experimental/src/main/java/org/jivesoftware/smackx/thumbnails/provider/ThumbnailElementProvider.java b/smack-experimental/src/main/java/org/jivesoftware/smackx/thumbnails/provider/ThumbnailElementProvider.java index 6fc1740022..3d3f2fa9ad 100644 --- a/smack-experimental/src/main/java/org/jivesoftware/smackx/thumbnails/provider/ThumbnailElementProvider.java +++ b/smack-experimental/src/main/java/org/jivesoftware/smackx/thumbnails/provider/ThumbnailElementProvider.java @@ -25,6 +25,7 @@ import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParserException; + import org.jivesoftware.smackx.thumbnails.element.ThumbnailElement; public class ThumbnailElementProvider extends ExtensionElementProvider { diff --git a/smack-experimental/src/test/java/org/jivesoftware/smackx/file_metadata/FileMetadataElementTest.java b/smack-experimental/src/test/java/org/jivesoftware/smackx/file_metadata/FileMetadataElementTest.java index 2295813082..23b73a59cc 100644 --- a/smack-experimental/src/test/java/org/jivesoftware/smackx/file_metadata/FileMetadataElementTest.java +++ b/smack-experimental/src/test/java/org/jivesoftware/smackx/file_metadata/FileMetadataElementTest.java @@ -26,6 +26,7 @@ import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.test.util.SmackTestUtil; + import org.jivesoftware.smackx.file_metadata.element.FileMetadataElement; import org.jivesoftware.smackx.file_metadata.provider.FileMetadataElementProvider; import org.jivesoftware.smackx.hashes.HashManager; diff --git a/smack-experimental/src/test/java/org/jivesoftware/smackx/thumbnails/provider/ThumbnailElementProviderTest.java b/smack-experimental/src/test/java/org/jivesoftware/smackx/thumbnails/provider/ThumbnailElementProviderTest.java index dbaec7c9a5..0e0f8a0786 100644 --- a/smack-experimental/src/test/java/org/jivesoftware/smackx/thumbnails/provider/ThumbnailElementProviderTest.java +++ b/smack-experimental/src/test/java/org/jivesoftware/smackx/thumbnails/provider/ThumbnailElementProviderTest.java @@ -24,6 +24,7 @@ import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.test.util.SmackTestUtil; import org.jivesoftware.smack.xml.XmlPullParserException; + import org.jivesoftware.smackx.thumbnails.element.ThumbnailElement; import org.junit.jupiter.params.ParameterizedTest; diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSession.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSession.java index 0e74aa813c..147467722d 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSession.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/bytestreams/ibb/InBandBytestreamSession.java @@ -461,7 +461,7 @@ private void cleanup() { * IQIBBInputStream class implements IBBInputStream to be used with IQ stanzas encapsulating the * data packets. */ - private class IQIBBInputStream extends IBBInputStream { + private final class IQIBBInputStream extends IBBInputStream { @Override protected StanzaListener getDataPacketListener() { @@ -541,7 +541,7 @@ protected StanzaFilter getDataPacketFilter() { * MessageIBBInputStream class implements IBBInputStream to be used with message stanzas * encapsulating the data packets. */ - private class MessageIBBInputStream extends IBBInputStream { + private final class MessageIBBInputStream extends IBBInputStream { @Override protected StanzaListener getDataPacketListener() { @@ -590,7 +590,7 @@ protected StanzaFilter getDataPacketFilter() { * containing an In-Band Bytestream data stanza extension whose session ID matches this sessions * ID. */ - private class IBBDataPacketFilter implements StanzaFilter { + private final class IBBDataPacketFilter implements StanzaFilter { @Override public boolean accept(Stanza packet) { @@ -814,7 +814,7 @@ protected void closeInternal(boolean flush) { * IQIBBOutputStream class implements IBBOutputStream to be used with IQ stanzas encapsulating * the data packets. */ - private class IQIBBOutputStream extends IBBOutputStream { + private final class IQIBBOutputStream extends IBBOutputStream { @Override protected synchronized void writeToXML(DataPacketExtension data) throws IOException { @@ -845,7 +845,7 @@ protected synchronized void writeToXML(DataPacketExtension data) throws IOExcept * MessageIBBOutputStream class implements IBBOutputStream to be used with message stanzas * encapsulating the data packets. */ - private class MessageIBBOutputStream extends IBBOutputStream { + private final class MessageIBBOutputStream extends IBBOutputStream { @Override protected synchronized void writeToXML(DataPacketExtension data) throws NotConnectedException, InterruptedException { 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 1173330951..8656907f05 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 @@ -433,7 +433,7 @@ public boolean isRunning() { /** * Implementation of a simplified SOCKS5 proxy server. */ - private class Socks5ServerProcess implements Runnable { + private final class Socks5ServerProcess implements Runnable { @Override public void run() { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AbstractAdHocCommand.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AbstractAdHocCommand.java index 8a12b29f35..7fb402326c 100755 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AbstractAdHocCommand.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AbstractAdHocCommand.java @@ -25,6 +25,7 @@ import org.jivesoftware.smack.XMPPException.XMPPErrorException; import org.jivesoftware.smack.packet.StanzaError; import org.jivesoftware.smack.util.StringUtils; + import org.jivesoftware.smackx.commands.packet.AdHocCommandData; import org.jivesoftware.smackx.commands.packet.AdHocCommandData.Action; import org.jivesoftware.smackx.commands.packet.AdHocCommandData.AllowedAction; diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommand.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommand.java index 0e7fabaaa6..4f1a4cda97 100755 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommand.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommand.java @@ -22,6 +22,7 @@ import org.jivesoftware.smack.XMPPException.XMPPErrorException; import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.util.Objects; + import org.jivesoftware.smackx.commands.packet.AdHocCommandData; import org.jivesoftware.smackx.xdata.form.FillableForm; import org.jivesoftware.smackx.xdata.form.SubmitForm; 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 5eb6d6ddae..d1c36d9432 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 @@ -20,6 +20,7 @@ import org.jivesoftware.smack.SmackException.NotConnectedException; import org.jivesoftware.smack.XMPPException.XMPPErrorException; import org.jivesoftware.smack.packet.StanzaError; + import org.jivesoftware.smackx.commands.packet.AdHocCommandData; import org.jivesoftware.smackx.commands.packet.AdHocCommandDataBuilder; import org.jivesoftware.smackx.xdata.form.SubmitForm; diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandResult.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandResult.java index e0927e2770..8dfc516857 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandResult.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandResult.java @@ -17,6 +17,7 @@ package org.jivesoftware.smackx.commands; import org.jivesoftware.smack.packet.IQ; + import org.jivesoftware.smackx.commands.packet.AdHocCommandData; import org.jivesoftware.smackx.xdata.form.FillableForm; import org.jivesoftware.smackx.xdata.packet.DataForm; diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/DirectMucInvitationListener.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/DirectMucInvitationListener.java index e8ef1af5e1..18b6e9071f 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/DirectMucInvitationListener.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/DirectMucInvitationListener.java @@ -17,6 +17,7 @@ package org.jivesoftware.smackx.muc; import org.jivesoftware.smack.packet.Stanza; + import org.jivesoftware.smackx.muc.packet.GroupChatInvitation; public interface DirectMucInvitationListener { diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/DirectMucInvitationManager.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/DirectMucInvitationManager.java index b05f10df0d..2dcafcea8e 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/DirectMucInvitationManager.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/DirectMucInvitationManager.java @@ -29,6 +29,7 @@ import org.jivesoftware.smack.filter.StanzaExtensionFilter; import org.jivesoftware.smack.packet.Message; import org.jivesoftware.smack.packet.MessageBuilder; + import org.jivesoftware.smackx.disco.ServiceDiscoveryManager; import org.jivesoftware.smackx.muc.packet.GroupChatInvitation; diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/provider/GroupChatInvitationProvider.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/provider/GroupChatInvitationProvider.java index 00ddabaf9c..a6e2f93848 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/provider/GroupChatInvitationProvider.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/provider/GroupChatInvitationProvider.java @@ -29,6 +29,7 @@ import org.jivesoftware.smack.util.ParserUtils; import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParserException; + import org.jivesoftware.smackx.muc.packet.GroupChatInvitation; import org.jxmpp.jid.EntityBareJid; diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/softwareinfo/form/SoftwareInfoForm.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/softwareinfo/form/SoftwareInfoForm.java index f2327facea..50d6136b29 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/softwareinfo/form/SoftwareInfoForm.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/softwareinfo/form/SoftwareInfoForm.java @@ -20,6 +20,7 @@ import org.jivesoftware.smack.util.EqualsUtil; import org.jivesoftware.smack.util.HashCode; + import org.jivesoftware.smackx.formtypes.FormFieldRegistry; import org.jivesoftware.smackx.mediaelement.element.MediaElement; import org.jivesoftware.smackx.xdata.FormField; diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/FormFieldWithOptions.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/FormFieldWithOptions.java index 677fb80762..3e7b4f6f69 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/FormFieldWithOptions.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/FormFieldWithOptions.java @@ -28,7 +28,7 @@ public interface FormFieldWithOptions { */ List getOptions(); - public interface Builder> { + interface Builder> { default B addOption(String option) { return addOption(new FormField.Option(option)); diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ByteStreamManagerTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ByteStreamManagerTest.java index 0c59cf73c8..39d0ac609b 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ByteStreamManagerTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ByteStreamManagerTest.java @@ -46,6 +46,7 @@ import org.jivesoftware.smack.packet.StanzaError; import org.jivesoftware.smack.test.util.NetworkUtil; import org.jivesoftware.smack.util.ExceptionUtil; + import org.jivesoftware.smackx.bytestreams.ibb.IBBPacketUtils; import org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream; import org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream.StreamHost; diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ClientForInitiatorTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ClientForInitiatorTest.java index 3ed68d212b..0cb0a58f74 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ClientForInitiatorTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/bytestreams/socks5/Socks5ClientForInitiatorTest.java @@ -33,6 +33,7 @@ import org.jivesoftware.smack.packet.IQ; import org.jivesoftware.smack.packet.StanzaError; import org.jivesoftware.smack.util.CloseableUtil; + import org.jivesoftware.smackx.bytestreams.ibb.IBBPacketUtils; import org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream; import org.jivesoftware.smackx.bytestreams.socks5.packet.Bytestream.StreamHost; diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/muc/MultiUserChatTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/muc/MultiUserChatTest.java index 6ffddb7a5b..80c0f3f0c1 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/muc/MultiUserChatTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/muc/MultiUserChatTest.java @@ -31,6 +31,7 @@ import org.jivesoftware.smack.packet.Stanza; import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.test.util.WaitForPacketListener; + import org.jivesoftware.smackx.muc.packet.GroupChatInvitation; import org.jivesoftware.smackx.muc.packet.MUCUser; import org.jivesoftware.smackx.muc.packet.MUCUser.Invite; diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/muc/packet/GroupChatInvitationElementTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/muc/packet/GroupChatInvitationElementTest.java index 1f28be5ce9..590152e71a 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/muc/packet/GroupChatInvitationElementTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/muc/packet/GroupChatInvitationElementTest.java @@ -24,6 +24,7 @@ import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.test.util.TestUtils; import org.jivesoftware.smack.xml.XmlPullParserException; + import org.jivesoftware.smackx.muc.provider.GroupChatInvitationProvider; import org.junit.jupiter.api.Test; diff --git a/smack-extensions/src/test/java/org/jivesoftware/smackx/receipts/DeliveryReceiptTest.java b/smack-extensions/src/test/java/org/jivesoftware/smackx/receipts/DeliveryReceiptTest.java index af11468a30..319f230fa1 100644 --- a/smack-extensions/src/test/java/org/jivesoftware/smackx/receipts/DeliveryReceiptTest.java +++ b/smack-extensions/src/test/java/org/jivesoftware/smackx/receipts/DeliveryReceiptTest.java @@ -96,7 +96,7 @@ public void receiptManagerListenerTest() throws Exception { rrl.waitUntilInvocationOrTimeout(); } - private static class TestReceiptReceivedListener extends WaitForPacketListener implements ReceiptReceivedListener { + private static final class TestReceiptReceivedListener extends WaitForPacketListener implements ReceiptReceivedListener { @Override public void onReceiptReceived(Jid fromJid, Jid toJid, String receiptId, Stanza receipt) { assertThat("julia@capulet.com", equalsCharSequence(fromJid)); diff --git a/smack-im/src/main/java/org/jivesoftware/smack/roster/Roster.java b/smack-im/src/main/java/org/jivesoftware/smack/roster/Roster.java index b515420158..3df9b904c5 100644 --- a/smack-im/src/main/java/org/jivesoftware/smack/roster/Roster.java +++ b/smack-im/src/main/java/org/jivesoftware/smack/roster/Roster.java @@ -1557,6 +1557,9 @@ private static void move(BareJid entity, Maptrue if the item type should be ignored * */ private static boolean hasValidSubscriptionType(RosterPacket.Item item) { switch (item.getItemType()) { @@ -1615,7 +1618,7 @@ public enum SubscriptionMode { /** * Listens for all presence packets and processes them. */ - private class PresencePacketListener implements StanzaListener { + private final class PresencePacketListener implements StanzaListener { @Override public void processStanza(Stanza packet) throws NotConnectedException, InterruptedException { @@ -1790,7 +1793,7 @@ public void run() { /** * Handles Roster results as described in RFC 6121 2.1.4. */ - private class RosterResultListener implements SuccessCallback { + private final class RosterResultListener implements SuccessCallback { @Override public void onSuccess(IQ packet) { diff --git a/smack-im/src/test/java/org/jivesoftware/smack/chat/ChatConnectionTest.java b/smack-im/src/test/java/org/jivesoftware/smack/chat/ChatConnectionTest.java index 62dde5f479..6bd4e74fac 100644 --- a/smack-im/src/test/java/org/jivesoftware/smack/chat/ChatConnectionTest.java +++ b/smack-im/src/test/java/org/jivesoftware/smack/chat/ChatConnectionTest.java @@ -396,7 +396,7 @@ public void run() { } } - private static class TestMessageListener implements ChatMessageListener { + private static final class TestMessageListener implements ChatMessageListener { private Chat msgChat; private int counter = 0; diff --git a/smack-integration-test/src/main/java/org/igniterealtime/smack/XmppConnectionStressTest.java b/smack-integration-test/src/main/java/org/igniterealtime/smack/XmppConnectionStressTest.java index a0f6589777..55b6ce65f9 100644 --- a/smack-integration-test/src/main/java/org/igniterealtime/smack/XmppConnectionStressTest.java +++ b/smack-integration-test/src/main/java/org/igniterealtime/smack/XmppConnectionStressTest.java @@ -44,6 +44,7 @@ import org.igniterealtime.smack.XmppConnectionStressTest.StressTestFailedException.ErrorsWhileSendingOrReceivingException; import org.igniterealtime.smack.XmppConnectionStressTest.StressTestFailedException.NotAllMessagesReceivedException; + import org.jxmpp.jid.EntityFullJid; public class XmppConnectionStressTest { diff --git a/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFramework.java b/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFramework.java index 6c322c2e7d..11e4f6119a 100644 --- a/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFramework.java +++ b/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFramework.java @@ -74,6 +74,7 @@ import org.igniterealtime.smack.inttest.annotations.BeforeClass; import org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest; import org.igniterealtime.smack.inttest.annotations.SpecificationReference; + import org.reflections.Reflections; import org.reflections.scanners.MethodAnnotationsScanner; import org.reflections.scanners.MethodParameterScanner; diff --git a/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/XmppConnectionManager.java b/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/XmppConnectionManager.java index 3b2f21b604..b1c6105e03 100644 --- a/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/XmppConnectionManager.java +++ b/smack-integration-test/src/main/java/org/igniterealtime/smack/inttest/XmppConnectionManager.java @@ -47,11 +47,13 @@ import org.jivesoftware.smack.util.StringUtils; import org.jivesoftware.smack.websocket.java11.Java11WebSocketFactory; import org.jivesoftware.smack.websocket.okhttp.OkHttpWebSocketFactory; + import org.jivesoftware.smackx.admin.ServiceAdministrationManager; import org.jivesoftware.smackx.iqregister.AccountManager; import org.igniterealtime.smack.inttest.Configuration.AccountRegistration; import org.igniterealtime.smack.inttest.SmackIntegrationTestFramework.AccountNum; + import org.jxmpp.jid.EntityBareJid; import org.jxmpp.jid.impl.JidCreate; import org.jxmpp.jid.parts.Localpart; 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 fdbb755c78..015919e13a 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 @@ -32,6 +32,7 @@ import org.igniterealtime.smack.inttest.SmackIntegrationTestEnvironment; import org.igniterealtime.smack.inttest.TestNotPossibleException; import org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest; + import org.jxmpp.jid.EntityFullJid; public class StreamManagementTest extends AbstractSmackSpecificLowLevelIntegrationTest { diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smack/chat2/IncomingMessageListenerIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smack/chat2/IncomingMessageListenerIntegrationTest.java index 7d536f0720..b28dd6d26a 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smack/chat2/IncomingMessageListenerIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smack/chat2/IncomingMessageListenerIntegrationTest.java @@ -22,6 +22,7 @@ import org.igniterealtime.smack.inttest.SmackIntegrationTestEnvironment; import org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest; import org.igniterealtime.smack.inttest.util.SimpleResultSyncPoint; + import org.jxmpp.jid.EntityBareJid; public class IncomingMessageListenerIntegrationTest extends AbstractChatIntegrationTest { diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smack/chat2/OutgoingMessageListenerIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smack/chat2/OutgoingMessageListenerIntegrationTest.java index 0b0109e984..062f1b84cb 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smack/chat2/OutgoingMessageListenerIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smack/chat2/OutgoingMessageListenerIntegrationTest.java @@ -23,6 +23,7 @@ import org.igniterealtime.smack.inttest.SmackIntegrationTestEnvironment; import org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest; import org.igniterealtime.smack.inttest.util.SimpleResultSyncPoint; + import org.jxmpp.jid.EntityBareJid; public class OutgoingMessageListenerIntegrationTest extends AbstractChatIntegrationTest { diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smack/roster/LowLevelRosterIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smack/roster/LowLevelRosterIntegrationTest.java index 9f150bd7ae..f0a5182a5d 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smack/roster/LowLevelRosterIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smack/roster/LowLevelRosterIntegrationTest.java @@ -26,6 +26,7 @@ import org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest; import org.igniterealtime.smack.inttest.util.IntegrationTestRosterUtil; import org.igniterealtime.smack.inttest.util.SimpleResultSyncPoint; + import org.jxmpp.jid.FullJid; public class LowLevelRosterIntegrationTest extends AbstractSmackLowLevelIntegrationTest { diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smack/roster/RosterIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smack/roster/RosterIntegrationTest.java index 98db355c68..29cf23f81f 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smack/roster/RosterIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smack/roster/RosterIntegrationTest.java @@ -40,6 +40,7 @@ import org.igniterealtime.smack.inttest.util.IntegrationTestRosterUtil; import org.igniterealtime.smack.inttest.util.ResultSyncPoint; import org.igniterealtime.smack.inttest.util.SimpleResultSyncPoint; + import org.jxmpp.jid.BareJid; import org.jxmpp.jid.Jid; diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandIntegrationTest.java index 1ece51611a..f405afb0d3 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/commands/AdHocCommandIntegrationTest.java @@ -24,6 +24,7 @@ import org.jivesoftware.smack.SmackException.NotConnectedException; import org.jivesoftware.smack.XMPPException.XMPPErrorException; import org.jivesoftware.smack.packet.StanzaError; + import org.jivesoftware.smackx.commands.packet.AdHocCommandData; import org.jivesoftware.smackx.commands.packet.AdHocCommandDataBuilder; import org.jivesoftware.smackx.commands.packet.AdHocCommandDataBuilder.NextStage; diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferIntegrationTest.java index 25ebb9b2a8..b54603a34e 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/filetransfer/FileTransferIntegrationTest.java @@ -26,6 +26,7 @@ import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPException.XMPPErrorException; import org.jivesoftware.smack.util.StringUtils; + import org.jivesoftware.smackx.filetransfer.FileTransfer.Status; import org.igniterealtime.smack.inttest.AbstractSmackIntegrationTest; diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/geolocation/GeolocationIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/geolocation/GeolocationIntegrationTest.java index 1cd1d3b8d4..ec9ff3846b 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/geolocation/GeolocationIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/geolocation/GeolocationIntegrationTest.java @@ -36,6 +36,7 @@ import org.igniterealtime.smack.inttest.annotations.SpecificationReference; import org.igniterealtime.smack.inttest.util.IntegrationTestRosterUtil; import org.igniterealtime.smack.inttest.util.SimpleResultSyncPoint; + import org.jxmpp.util.XmppDateTime; @SpecificationReference(document = "XEP-0080", version = "1.9") diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/iot/IoTControlIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/iot/IoTControlIntegrationTest.java index 4d4844adfb..507024cdcc 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/iot/IoTControlIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/iot/IoTControlIntegrationTest.java @@ -36,6 +36,7 @@ import org.igniterealtime.smack.inttest.annotations.SpecificationReference; import org.igniterealtime.smack.inttest.util.IntegrationTestRosterUtil; import org.igniterealtime.smack.inttest.util.SimpleResultSyncPoint; + import org.jxmpp.jid.Jid; @SpecificationReference(document = "XEP-0347", version = "0.5.1") diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/iot/IoTDiscoveryIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/iot/IoTDiscoveryIntegrationTest.java index 7c3f3dcac3..63f851d96c 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/iot/IoTDiscoveryIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/iot/IoTDiscoveryIntegrationTest.java @@ -35,6 +35,7 @@ import org.igniterealtime.smack.inttest.TestNotPossibleException; import org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest; import org.igniterealtime.smack.inttest.annotations.SpecificationReference; + import org.jxmpp.jid.Jid; @SpecificationReference(document = "XEP-0347", version = "0.5.1") diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/mam/MamIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/mam/MamIntegrationTest.java index 9b9cba7a35..764fdd9e0c 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/mam/MamIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/mam/MamIntegrationTest.java @@ -35,6 +35,7 @@ import org.jivesoftware.smack.packet.Stanza; import org.jivesoftware.smack.packet.StanzaBuilder; import org.jivesoftware.smack.packet.StanzaError; + import org.jivesoftware.smackx.mam.MamManager.MamQuery; import org.jivesoftware.smackx.mam.MamManager.MamQueryArgs; @@ -44,6 +45,7 @@ import org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest; import org.igniterealtime.smack.inttest.annotations.SpecificationReference; import org.igniterealtime.smack.inttest.util.SimpleResultSyncPoint; + import org.jxmpp.jid.EntityBareJid; @SpecificationReference(document = "XEP-0313", version = "0.6.3") diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/AbstractMultiUserChatIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/AbstractMultiUserChatIntegrationTest.java index 6f354f2aec..2b47427697 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/AbstractMultiUserChatIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/AbstractMultiUserChatIntegrationTest.java @@ -25,6 +25,7 @@ import org.jivesoftware.smack.XMPPException.XMPPErrorException; import org.jivesoftware.smack.packet.StanzaError; import org.jivesoftware.smack.util.StringUtils; + import org.jivesoftware.smackx.muc.MultiUserChatException.MissingMucCreationAcknowledgeException; import org.jivesoftware.smackx.muc.MultiUserChatException.MucAlreadyJoinedException; import org.jivesoftware.smackx.muc.MultiUserChatException.NotAMucServiceException; @@ -34,6 +35,7 @@ import org.igniterealtime.smack.inttest.AbstractSmackIntegrationTest; import org.igniterealtime.smack.inttest.SmackIntegrationTestEnvironment; import org.igniterealtime.smack.inttest.TestNotPossibleException; + import org.jxmpp.jid.DomainBareJid; import org.jxmpp.jid.EntityBareJid; import org.jxmpp.jid.impl.JidCreate; diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatEntityIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatEntityIntegrationTest.java index b142c2ce76..196df3b2c2 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatEntityIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatEntityIntegrationTest.java @@ -28,6 +28,7 @@ import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.packet.StanzaError; + import org.jivesoftware.smackx.disco.ServiceDiscoveryManager; import org.jivesoftware.smackx.disco.packet.DiscoverInfo; import org.jivesoftware.smackx.disco.packet.DiscoverItems; diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatIntegrationTest.java index d689a95499..3a2eaba526 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatIntegrationTest.java @@ -32,6 +32,7 @@ import org.jivesoftware.smack.XMPPException.XMPPErrorException; import org.jivesoftware.smack.packet.Message; import org.jivesoftware.smack.packet.StanzaError; + import org.jivesoftware.smackx.muc.MultiUserChatException.MissingMucCreationAcknowledgeException; import org.jivesoftware.smackx.muc.MultiUserChatException.MucAlreadyJoinedException; import org.jivesoftware.smackx.muc.MultiUserChatException.MucConfigurationNotSupportedException; @@ -42,6 +43,7 @@ import org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest; import org.igniterealtime.smack.inttest.annotations.SpecificationReference; import org.igniterealtime.smack.inttest.util.SimpleResultSyncPoint; + import org.jxmpp.jid.EntityBareJid; import org.jxmpp.jid.parts.Resourcepart; import org.jxmpp.stringprep.XmppStringprepException; 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 e133849402..286a5969b1 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 @@ -34,6 +34,7 @@ import org.igniterealtime.smack.inttest.TestNotPossibleException; import org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest; import org.igniterealtime.smack.inttest.annotations.SpecificationReference; + import org.jxmpp.jid.DomainBareJid; import org.jxmpp.jid.impl.JidCreate; import org.jxmpp.jid.parts.Localpart; diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatOccupantIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatOccupantIntegrationTest.java index 3fddfd2f0f..108cc010b7 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatOccupantIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatOccupantIntegrationTest.java @@ -41,6 +41,7 @@ import org.jivesoftware.smack.packet.StanzaError; import org.jivesoftware.smack.sm.predicates.ForEveryMessage; import org.jivesoftware.smack.util.StringUtils; + import org.jivesoftware.smackx.muc.MultiUserChatException.MissingMucCreationAcknowledgeException; import org.jivesoftware.smackx.muc.MultiUserChatException.MucAlreadyJoinedException; import org.jivesoftware.smackx.muc.MultiUserChatException.MucConfigurationNotSupportedException; @@ -57,6 +58,7 @@ import org.igniterealtime.smack.inttest.util.MultiResultSyncPoint; import org.igniterealtime.smack.inttest.util.ResultSyncPoint; import org.igniterealtime.smack.inttest.util.SimpleResultSyncPoint; + import org.jxmpp.jid.EntityBareJid; import org.jxmpp.jid.impl.JidCreate; import org.jxmpp.jid.parts.Resourcepart; diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatRolesAffiliationsPrivilegesIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatRolesAffiliationsPrivilegesIntegrationTest.java index 1fe5b96725..10316a2775 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatRolesAffiliationsPrivilegesIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/MultiUserChatRolesAffiliationsPrivilegesIntegrationTest.java @@ -32,6 +32,7 @@ import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.packet.Presence; + import org.jivesoftware.smackx.muc.MultiUserChatException.MissingMucCreationAcknowledgeException; import org.jivesoftware.smackx.muc.MultiUserChatException.MucAlreadyJoinedException; import org.jivesoftware.smackx.muc.MultiUserChatException.NotAMucServiceException; @@ -43,6 +44,7 @@ import org.igniterealtime.smack.inttest.annotations.SpecificationReference; import org.igniterealtime.smack.inttest.util.ResultSyncPoint; import org.igniterealtime.smack.inttest.util.SimpleResultSyncPoint; + import org.jxmpp.jid.EntityBareJid; import org.jxmpp.jid.EntityFullJid; import org.jxmpp.jid.Jid; diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/ParticipantStatusIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/ParticipantStatusIntegrationTest.java index d0381a5f71..76f32a616e 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/ParticipantStatusIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/ParticipantStatusIntegrationTest.java @@ -24,6 +24,7 @@ import org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest; import org.igniterealtime.smack.inttest.annotations.SpecificationReference; import org.igniterealtime.smack.inttest.util.SimpleResultSyncPoint; + import org.jxmpp.jid.EntityBareJid; import org.jxmpp.jid.EntityFullJid; import org.jxmpp.jid.impl.JidCreate; diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/UserStatusIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/UserStatusIntegrationTest.java index 8a182e3caa..2b1c5aa9fa 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/UserStatusIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/muc/UserStatusIntegrationTest.java @@ -19,6 +19,7 @@ import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.packet.Presence; + import org.jivesoftware.smackx.muc.packet.MUCUser; import org.igniterealtime.smack.inttest.SmackIntegrationTestEnvironment; @@ -26,6 +27,7 @@ import org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest; import org.igniterealtime.smack.inttest.annotations.SpecificationReference; import org.igniterealtime.smack.inttest.util.SimpleResultSyncPoint; + import org.jxmpp.jid.EntityBareJid; import org.jxmpp.jid.EntityFullJid; import org.jxmpp.jid.impl.JidCreate; diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/ox/AbstractOpenPgpIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/ox/AbstractOpenPgpIntegrationTest.java index 31d613c85b..2d3d687780 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/ox/AbstractOpenPgpIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/ox/AbstractOpenPgpIntegrationTest.java @@ -26,6 +26,7 @@ import org.igniterealtime.smack.inttest.AbstractSmackIntegrationTest; import org.igniterealtime.smack.inttest.SmackIntegrationTestEnvironment; import org.igniterealtime.smack.inttest.TestNotPossibleException; + import org.jxmpp.jid.BareJid; public abstract class AbstractOpenPgpIntegrationTest extends AbstractSmackIntegrationTest { diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/ox/OXSecretKeyBackupIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/ox/OXSecretKeyBackupIntegrationTest.java index 93f936785b..c5971f2fc3 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/ox/OXSecretKeyBackupIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/ox/OXSecretKeyBackupIntegrationTest.java @@ -31,6 +31,7 @@ import org.jivesoftware.smack.SmackException; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.util.StringUtils; + import org.jivesoftware.smackx.ox.crypto.PainlessOpenPgpProvider; import org.jivesoftware.smackx.ox.exception.InvalidBackupCodeException; import org.jivesoftware.smackx.ox.exception.MissingOpenPgpKeyException; @@ -41,15 +42,16 @@ import org.jivesoftware.smackx.ox.util.OpenPgpPubSubUtil; import org.jivesoftware.smackx.pubsub.PubSubException; -import org.bouncycastle.openpgp.PGPException; -import org.bouncycastle.openpgp.PGPPublicKeyRing; -import org.bouncycastle.openpgp.PGPSecretKeyRing; import org.igniterealtime.smack.inttest.SmackIntegrationTestEnvironment; import org.igniterealtime.smack.inttest.TestNotPossibleException; import org.igniterealtime.smack.inttest.annotations.AfterClass; import org.igniterealtime.smack.inttest.annotations.BeforeClass; import org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest; import org.igniterealtime.smack.inttest.annotations.SpecificationReference; + +import org.bouncycastle.openpgp.PGPException; +import org.bouncycastle.openpgp.PGPPublicKeyRing; +import org.bouncycastle.openpgp.PGPSecretKeyRing; import org.pgpainless.key.OpenPgpV4Fingerprint; import org.pgpainless.key.protection.UnprotectedKeysProtector; diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/ox_im/OXInstantMessagingIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/ox_im/OXInstantMessagingIntegrationTest.java index 4467dde1f3..5ec31757ac 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/ox_im/OXInstantMessagingIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/ox_im/OXInstantMessagingIntegrationTest.java @@ -42,6 +42,7 @@ import org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest; import org.igniterealtime.smack.inttest.annotations.SpecificationReference; import org.igniterealtime.smack.inttest.util.SimpleResultSyncPoint; + import org.pgpainless.decryption_verification.OpenPgpMetadata; import org.pgpainless.key.OpenPgpV4Fingerprint; import org.pgpainless.key.protection.UnprotectedKeysProtector; diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/ping/PingIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/ping/PingIntegrationTest.java index a2cbce7ce2..d05784ed95 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/ping/PingIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/ping/PingIntegrationTest.java @@ -36,6 +36,7 @@ import org.igniterealtime.smack.inttest.SmackIntegrationTestEnvironment; import org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest; import org.igniterealtime.smack.inttest.annotations.SpecificationReference; + import org.jxmpp.jid.Jid; @SpecificationReference(document = "XEP-0199", version = "2.0.1") diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/pubsub/PubSubIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/pubsub/PubSubIntegrationTest.java index d3f990a4ac..69aad5dbda 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/pubsub/PubSubIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/pubsub/PubSubIntegrationTest.java @@ -35,6 +35,7 @@ import org.igniterealtime.smack.inttest.TestNotPossibleException; import org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest; import org.igniterealtime.smack.inttest.annotations.SpecificationReference; + import org.jxmpp.jid.DomainBareJid; @SpecificationReference(document = "XEP-0060", version = "1.26.0") diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/softwareInfo/SoftwareInfoIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/softwareInfo/SoftwareInfoIntegrationTest.java index f01371f10d..2e4becabb0 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/softwareInfo/SoftwareInfoIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/softwareInfo/SoftwareInfoIntegrationTest.java @@ -25,6 +25,7 @@ import org.jivesoftware.smack.parsing.SmackParsingException; import org.jivesoftware.smack.util.Async.ThrowingRunnable; import org.jivesoftware.smack.xml.XmlPullParserException; + import org.jivesoftware.smackx.mediaelement.element.MediaElement; import org.jivesoftware.smackx.softwareinfo.SoftwareInfoManager; import org.jivesoftware.smackx.softwareinfo.form.SoftwareInfoForm; diff --git a/smack-integration-test/src/main/java/org/jivesoftware/smackx/usertune/UserTuneIntegrationTest.java b/smack-integration-test/src/main/java/org/jivesoftware/smackx/usertune/UserTuneIntegrationTest.java index e204031c46..d0c0ddc634 100644 --- a/smack-integration-test/src/main/java/org/jivesoftware/smackx/usertune/UserTuneIntegrationTest.java +++ b/smack-integration-test/src/main/java/org/jivesoftware/smackx/usertune/UserTuneIntegrationTest.java @@ -34,6 +34,7 @@ import org.igniterealtime.smack.inttest.annotations.SpecificationReference; import org.igniterealtime.smack.inttest.util.IntegrationTestRosterUtil; import org.igniterealtime.smack.inttest.util.SimpleResultSyncPoint; + import org.junit.jupiter.api.Assertions; @SpecificationReference(document = "XEP-0118", version = "1.3.0") diff --git a/smack-integration-test/src/test/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFrameWorkTest.java b/smack-integration-test/src/test/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFrameWorkTest.java index fbdfa8cef1..bb144febe7 100644 --- a/smack-integration-test/src/test/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFrameWorkTest.java +++ b/smack-integration-test/src/test/java/org/igniterealtime/smack/inttest/SmackIntegrationTestFrameWorkTest.java @@ -30,26 +30,26 @@ public class SmackIntegrationTestFrameWorkTest { - private static class ValidLowLevelList { + private static final class ValidLowLevelList { @SuppressWarnings({"unused", "MethodCanBeStatic"}) public void test(List connections) { } } - private static class InvalidLowLevelList { + private static final class InvalidLowLevelList { @SuppressWarnings({"unused", "MethodCanBeStatic"}) public void test(List connections, boolean invalid) { } } - private static class ValidLowLevelVarargs { + private static final class ValidLowLevelVarargs { @SuppressWarnings({"unused", "MethodCanBeStatic"}) public void test(AbstractXMPPConnection connectionOne, AbstractXMPPConnection connectionTwo, AbstractXMPPConnection connectionThree) { } } - private static class InvalidLowLevelVarargs { + private static final class InvalidLowLevelVarargs { @SuppressWarnings({"unused", "MethodCanBeStatic"}) public void test(AbstractXMPPConnection connectionOne, Integer invalid, AbstractXMPPConnection connectionTwo, AbstractXMPPConnection connectionThree) { @@ -96,7 +96,7 @@ public void testInvalidLowLevelVargs() { assertNull(determinedParameterType); } - private static class ValidUnconnectedConnectionSource { + private static final class ValidUnconnectedConnectionSource { @SuppressWarnings({"unused", "MethodCanBeStatic"}) public void test(AbstractSmackLowLevelIntegrationTest.UnconnectedConnectionSource source) { } diff --git a/smack-integration-test/src/test/java/org/igniterealtime/smack/inttest/unittest/SmackIntegrationTestFrameworkUnitTest.java b/smack-integration-test/src/test/java/org/igniterealtime/smack/inttest/unittest/SmackIntegrationTestFrameworkUnitTest.java index e1398e73b3..4e4760e02a 100644 --- a/smack-integration-test/src/test/java/org/igniterealtime/smack/inttest/unittest/SmackIntegrationTestFrameworkUnitTest.java +++ b/smack-integration-test/src/test/java/org/igniterealtime/smack/inttest/unittest/SmackIntegrationTestFrameworkUnitTest.java @@ -44,6 +44,7 @@ import org.igniterealtime.smack.inttest.annotations.AfterClass; import org.igniterealtime.smack.inttest.annotations.BeforeClass; import org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest; + import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; diff --git a/smack-integration-test/src/test/java/org/igniterealtime/smack/inttest/util/MultiResultSyncPointTest.java b/smack-integration-test/src/test/java/org/igniterealtime/smack/inttest/util/MultiResultSyncPointTest.java index 5a4db37c44..e525640c2d 100644 --- a/smack-integration-test/src/test/java/org/igniterealtime/smack/inttest/util/MultiResultSyncPointTest.java +++ b/smack-integration-test/src/test/java/org/igniterealtime/smack/inttest/util/MultiResultSyncPointTest.java @@ -97,7 +97,7 @@ public void runOrThrow() throws InterruptedException, BrokenBarrierException { } } - private static class TestException extends Exception { + private static final class TestException extends Exception { /** * diff --git a/smack-integration-test/src/test/java/org/igniterealtime/smack/inttest/util/ResultSyncPointTest.java b/smack-integration-test/src/test/java/org/igniterealtime/smack/inttest/util/ResultSyncPointTest.java index c6e22bd72d..efcbb5b395 100644 --- a/smack-integration-test/src/test/java/org/igniterealtime/smack/inttest/util/ResultSyncPointTest.java +++ b/smack-integration-test/src/test/java/org/igniterealtime/smack/inttest/util/ResultSyncPointTest.java @@ -73,7 +73,7 @@ public void testTimeout() throws Exception { } } - private static class TestException extends Exception { + private static final class TestException extends Exception { /** * diff --git a/smack-java11/src/main/java/org/jivesoftware/smack/java7/XmppHostnameVerifier.java b/smack-java11/src/main/java/org/jivesoftware/smack/java7/XmppHostnameVerifier.java index a03cd097ab..bc88484bfc 100644 --- a/smack-java11/src/main/java/org/jivesoftware/smack/java7/XmppHostnameVerifier.java +++ b/smack-java11/src/main/java/org/jivesoftware/smack/java7/XmppHostnameVerifier.java @@ -221,7 +221,7 @@ private static boolean matchWildCards(String name, String template) { afterWildcard = afterWildcard.substring(wildcardIndex + 1); int beforeStartIndex = name.indexOf(beforeWildcard); - if ((beforeStartIndex == -1) || (isBeginning && beforeStartIndex != 0)) { + if (beforeStartIndex == -1 || (isBeginning && beforeStartIndex != 0)) { return false; } isBeginning = false; diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/listeners/JingleSessionListener.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/listeners/JingleSessionListener.java index 768cc42c97..d335083161 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/listeners/JingleSessionListener.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/listeners/JingleSessionListener.java @@ -20,6 +20,7 @@ import org.jivesoftware.smack.SmackException.NotConnectedException; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.XMPPException.XMPPErrorException; + import org.jivesoftware.smackx.jingleold.JingleSession; import org.jivesoftware.smackx.jingleold.media.PayloadType; import org.jivesoftware.smackx.jingleold.nat.TransportCandidate; diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/listeners/JingleTransportListener.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/listeners/JingleTransportListener.java index 55478c2768..7afc6bfb11 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/listeners/JingleTransportListener.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/listeners/JingleTransportListener.java @@ -20,6 +20,7 @@ import org.jivesoftware.smack.SmackException.NotConnectedException; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.XMPPException.XMPPErrorException; + import org.jivesoftware.smackx.jingleold.nat.TransportCandidate; /** diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/BridgedTransportManager.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/BridgedTransportManager.java index 151f6dff11..5929fc78ec 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/BridgedTransportManager.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/BridgedTransportManager.java @@ -21,6 +21,7 @@ import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.XMPPException.XMPPErrorException; + import org.jivesoftware.smackx.jingleold.JingleSession; import org.jivesoftware.smackx.jingleold.listeners.CreatedJingleSessionListener; import org.jivesoftware.smackx.jingleold.listeners.JingleSessionListener; diff --git a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/ICETransportManager.java b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/ICETransportManager.java index b8cb0f8504..6d52161c73 100644 --- a/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/ICETransportManager.java +++ b/smack-jingle-old/src/main/java/org/jivesoftware/smackx/jingleold/nat/ICETransportManager.java @@ -25,6 +25,7 @@ import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.XMPPException.XMPPErrorException; + import org.jivesoftware.smackx.jingleold.JingleSession; import org.jivesoftware.smackx.jingleold.listeners.CreatedJingleSessionListener; import org.jivesoftware.smackx.jingleold.listeners.JingleSessionListener; diff --git a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/AgentRoster.java b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/AgentRoster.java index c0f489e8b4..988db997bb 100644 --- a/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/AgentRoster.java +++ b/smack-legacy/src/main/java/org/jivesoftware/smackx/workgroup/agent/AgentRoster.java @@ -301,7 +301,7 @@ private static Presence synthesizeUnvailablePresence(Jid from) { /** * Listens for all presence packets and processes them. */ - private class PresencePacketListener implements StanzaListener { + private final class PresencePacketListener implements StanzaListener { @Override public void processStanza(Stanza packet) { Presence presence = (Presence) packet; @@ -376,7 +376,7 @@ else if (presence.getType() == Presence.Type.unavailable) { /** * Listens for all roster packets and processes them. */ - private class AgentStatusListener implements StanzaListener { + private final class AgentStatusListener implements StanzaListener { @Override public void processStanza(Stanza packet) { diff --git a/smack-omemo-signal-integration-test/src/main/java/org/igniterealtime/smack/inttest/smack_omemo_signal/SmackOmemoSignalIntegrationTestFramework.java b/smack-omemo-signal-integration-test/src/main/java/org/igniterealtime/smack/inttest/smack_omemo_signal/SmackOmemoSignalIntegrationTestFramework.java index d79154e4af..a75337243e 100644 --- a/smack-omemo-signal-integration-test/src/main/java/org/igniterealtime/smack/inttest/smack_omemo_signal/SmackOmemoSignalIntegrationTestFramework.java +++ b/smack-omemo-signal-integration-test/src/main/java/org/igniterealtime/smack/inttest/smack_omemo_signal/SmackOmemoSignalIntegrationTestFramework.java @@ -39,9 +39,10 @@ import org.jivesoftware.smackx.omemo.exceptions.CorruptedOmemoKeyException; import org.jivesoftware.smackx.omemo.signal.SignalOmemoService; -import org.bouncycastle.jce.provider.BouncyCastleProvider; import org.igniterealtime.smack.inttest.SmackIntegrationTestFramework; +import org.bouncycastle.jce.provider.BouncyCastleProvider; + public class SmackOmemoSignalIntegrationTestFramework { static { diff --git a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/CachingOmemoStore.java b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/CachingOmemoStore.java index f4c546bb34..eb1c078b04 100644 --- a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/CachingOmemoStore.java +++ b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/CachingOmemoStore.java @@ -468,7 +468,7 @@ private KeyCache getCache(O * @param type of the public signed preKey * @param type of the OMEMO session */ - private static class KeyCache { + private static final class KeyCache { private T_IdKeyPair identityKeyPair; private final TreeMap preKeys = new TreeMap<>(); private final TreeMap signedPreKeys = new TreeMap<>(); diff --git a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/internal/OmemoAesCipher.java b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/internal/OmemoAesCipher.java index 4edb10c4dd..313563290d 100644 --- a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/internal/OmemoAesCipher.java +++ b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/internal/OmemoAesCipher.java @@ -30,6 +30,7 @@ import javax.crypto.spec.SecretKeySpec; import org.jivesoftware.smack.util.RandomUtil; + import org.jivesoftware.smackx.omemo.util.OmemoConstants; import org.jivesoftware.smackx.omemo.util.OmemoMessageBuilder; diff --git a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/util/OmemoMessageBuilder.java b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/util/OmemoMessageBuilder.java index 5144b4f028..228157054b 100644 --- a/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/util/OmemoMessageBuilder.java +++ b/smack-omemo/src/main/java/org/jivesoftware/smackx/omemo/util/OmemoMessageBuilder.java @@ -24,12 +24,14 @@ import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.util.ArrayList; + import javax.crypto.BadPaddingException; import javax.crypto.IllegalBlockSizeException; import javax.crypto.KeyGenerator; import javax.crypto.NoSuchPaddingException; import org.jivesoftware.smack.util.RandomUtil; + import org.jivesoftware.smackx.omemo.OmemoRatchet; import org.jivesoftware.smackx.omemo.OmemoService; import org.jivesoftware.smackx.omemo.element.OmemoElement; diff --git a/smack-omemo/src/test/java/org/jivesoftware/smackx/omemo/WrapperObjectsTest.java b/smack-omemo/src/test/java/org/jivesoftware/smackx/omemo/WrapperObjectsTest.java index 88f6326402..1777d2eb3b 100644 --- a/smack-omemo/src/test/java/org/jivesoftware/smackx/omemo/WrapperObjectsTest.java +++ b/smack-omemo/src/test/java/org/jivesoftware/smackx/omemo/WrapperObjectsTest.java @@ -26,6 +26,7 @@ import java.security.NoSuchAlgorithmException; import org.jivesoftware.smack.test.util.SmackTestSuite; + import org.jivesoftware.smackx.omemo.element.OmemoElement; import org.jivesoftware.smackx.omemo.exceptions.CryptoFailedException; import org.jivesoftware.smackx.omemo.internal.CipherAndAuthTag; diff --git a/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/OpenPgpContact.java b/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/OpenPgpContact.java index c575fc5b72..050b62ba01 100644 --- a/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/OpenPgpContact.java +++ b/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/OpenPgpContact.java @@ -31,6 +31,7 @@ import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPException; import org.jivesoftware.smack.util.stringencoder.Base64; + import org.jivesoftware.smackx.ox.element.PubkeyElement; import org.jivesoftware.smackx.ox.element.PublicKeysListElement; import org.jivesoftware.smackx.ox.exception.MissingUserIdOnKeyException; diff --git a/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/OpenPgpManager.java b/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/OpenPgpManager.java index b4a22c7cca..56d81f122f 100644 --- a/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/OpenPgpManager.java +++ b/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/OpenPgpManager.java @@ -42,6 +42,7 @@ import org.jivesoftware.smack.util.Async; import org.jivesoftware.smack.util.stringencoder.Base64; import org.jivesoftware.smack.xml.XmlPullParserException; + import org.jivesoftware.smackx.disco.ServiceDiscoveryManager; import org.jivesoftware.smackx.ox.callback.backup.AskForBackupCodeCallback; import org.jivesoftware.smackx.ox.callback.backup.SecretKeyBackupSelectionCallback; diff --git a/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/crypto/OpenPgpProvider.java b/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/crypto/OpenPgpProvider.java index ba09360413..08262cf682 100644 --- a/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/crypto/OpenPgpProvider.java +++ b/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/crypto/OpenPgpProvider.java @@ -20,6 +20,7 @@ import java.util.Collection; import org.jivesoftware.smack.XMPPConnection; + import org.jivesoftware.smackx.ox.OpenPgpContact; import org.jivesoftware.smackx.ox.OpenPgpMessage; import org.jivesoftware.smackx.ox.OpenPgpSelf; diff --git a/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/crypto/PainlessOpenPgpProvider.java b/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/crypto/PainlessOpenPgpProvider.java index 304e3e0063..ed698eee22 100644 --- a/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/crypto/PainlessOpenPgpProvider.java +++ b/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/crypto/PainlessOpenPgpProvider.java @@ -29,6 +29,7 @@ import org.jivesoftware.smack.XMPPException.XMPPErrorException; import org.jivesoftware.smack.util.Objects; import org.jivesoftware.smack.util.stringencoder.Base64; + import org.jivesoftware.smackx.ox.OpenPgpContact; import org.jivesoftware.smackx.ox.OpenPgpMessage; import org.jivesoftware.smackx.ox.OpenPgpSelf; diff --git a/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/element/OpenPgpElement.java b/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/element/OpenPgpElement.java index 8954064f98..9c1d91ba12 100644 --- a/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/element/OpenPgpElement.java +++ b/smack-openpgp/src/main/java/org/jivesoftware/smackx/ox/element/OpenPgpElement.java @@ -25,8 +25,8 @@ import org.jivesoftware.smack.packet.Stanza; import org.jivesoftware.smack.util.StringUtils; import org.jivesoftware.smack.util.XmlStringBuilder; - import org.jivesoftware.smack.util.stringencoder.Base64; + import org.jivesoftware.smackx.ox.util.Util; /** diff --git a/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/OpenPgpElementTest.java b/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/OpenPgpElementTest.java index a958d1adb1..fcd9465b13 100644 --- a/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/OpenPgpElementTest.java +++ b/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/OpenPgpElementTest.java @@ -34,6 +34,7 @@ import org.jivesoftware.smack.test.util.TestUtils; import org.jivesoftware.smack.xml.XmlPullParser; import org.jivesoftware.smack.xml.XmlPullParserException; + import org.jivesoftware.smackx.ox.element.CryptElement; import org.jivesoftware.smackx.ox.element.OpenPgpElement; import org.jivesoftware.smackx.ox.element.SignElement; diff --git a/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/OpenPgpStoreTest.java b/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/OpenPgpStoreTest.java index 30e3f05af1..89783d0236 100644 --- a/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/OpenPgpStoreTest.java +++ b/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/OpenPgpStoreTest.java @@ -37,6 +37,7 @@ import java.util.Map; import org.jivesoftware.smack.test.util.SmackTestSuite; + import org.jivesoftware.smackx.ox.callback.SecretKeyPassphraseCallback; import org.jivesoftware.smackx.ox.exception.MissingUserIdOnKeyException; import org.jivesoftware.smackx.ox.store.definition.OpenPgpStore; diff --git a/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/PainlessOpenPgpProviderTest.java b/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/PainlessOpenPgpProviderTest.java index 41319bd6f8..4f1b87a737 100644 --- a/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/PainlessOpenPgpProviderTest.java +++ b/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/PainlessOpenPgpProviderTest.java @@ -35,6 +35,7 @@ import org.jivesoftware.smack.packet.Message; import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.xml.XmlPullParserException; + import org.jivesoftware.smackx.ox.crypto.OpenPgpElementAndMetadata; import org.jivesoftware.smackx.ox.crypto.PainlessOpenPgpProvider; import org.jivesoftware.smackx.ox.element.CryptElement; diff --git a/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/PubSubDelegateTest.java b/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/PubSubDelegateTest.java index 0bb120f8fc..1e6b44c813 100644 --- a/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/PubSubDelegateTest.java +++ b/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/PubSubDelegateTest.java @@ -19,6 +19,7 @@ import static org.junit.jupiter.api.Assertions.assertEquals; import org.jivesoftware.smack.test.util.SmackTestSuite; + import org.jivesoftware.smackx.ox.util.OpenPgpPubSubUtil; import org.junit.jupiter.api.Test; diff --git a/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/PublicKeysListElementTest.java b/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/PublicKeysListElementTest.java index eb7f3922c8..fd05dcdba7 100644 --- a/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/PublicKeysListElementTest.java +++ b/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/PublicKeysListElementTest.java @@ -24,6 +24,7 @@ import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.test.util.TestUtils; import org.jivesoftware.smack.xml.XmlPullParser; + import org.jivesoftware.smackx.ox.element.PublicKeysListElement; import org.jivesoftware.smackx.ox.provider.PublicKeysListElementProvider; diff --git a/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/SecretKeyBackupHelperTest.java b/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/SecretKeyBackupHelperTest.java index 74f9471f8e..4cc22b7c58 100644 --- a/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/SecretKeyBackupHelperTest.java +++ b/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/SecretKeyBackupHelperTest.java @@ -26,6 +26,7 @@ import java.util.Collections; import org.jivesoftware.smack.test.util.SmackTestSuite; + import org.jivesoftware.smackx.ox.crypto.PainlessOpenPgpProvider; import org.jivesoftware.smackx.ox.element.SecretkeyElement; import org.jivesoftware.smackx.ox.exception.InvalidBackupCodeException; diff --git a/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/SecretkeyElementTest.java b/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/SecretkeyElementTest.java index 9e8922cf2d..2afdcd8ab3 100644 --- a/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/SecretkeyElementTest.java +++ b/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox/SecretkeyElementTest.java @@ -24,6 +24,7 @@ import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.test.util.TestUtils; import org.jivesoftware.smack.xml.XmlPullParser; + import org.jivesoftware.smackx.ox.element.SecretkeyElement; import org.jivesoftware.smackx.ox.provider.SecretkeyElementProvider; diff --git a/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox_im/OXInstantMessagingManagerTest.java b/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox_im/OXInstantMessagingManagerTest.java index 668a142049..33e2ac9052 100644 --- a/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox_im/OXInstantMessagingManagerTest.java +++ b/smack-openpgp/src/test/java/org/jivesoftware/smackx/ox_im/OXInstantMessagingManagerTest.java @@ -38,6 +38,7 @@ import org.jivesoftware.smack.test.util.SmackTestSuite; import org.jivesoftware.smack.util.StringUtils; import org.jivesoftware.smack.xml.XmlPullParserException; + import org.jivesoftware.smackx.eme.element.ExplicitMessageEncryptionElement; import org.jivesoftware.smackx.ox.OpenPgpContact; import org.jivesoftware.smackx.ox.OpenPgpManager; diff --git a/smack-resolver-minidns-dox/src/test/java/org/jivesoftware/smackx/dox/resolver/minidns/DnsOverXmppMiniDnsResolverTest.java b/smack-resolver-minidns-dox/src/test/java/org/jivesoftware/smackx/dox/resolver/minidns/DnsOverXmppMiniDnsResolverTest.java index d98b2fdebc..0912a20085 100644 --- a/smack-resolver-minidns-dox/src/test/java/org/jivesoftware/smackx/dox/resolver/minidns/DnsOverXmppMiniDnsResolverTest.java +++ b/smack-resolver-minidns-dox/src/test/java/org/jivesoftware/smackx/dox/resolver/minidns/DnsOverXmppMiniDnsResolverTest.java @@ -146,7 +146,7 @@ private static DnsMessage createNxDomainAnswerFor(DnsMessage query) { // TODO: Workaround for NPE-if-no-cache-set bug in MiniDNS. Remove we use a MiniDNS version where this is fixed, // i.e. one that has 864fbb5 ("Fix NPE in AbstractDnsClient if cache is 'null'") - private static class NoopDnsCache extends DnsCache { + private static final class NoopDnsCache extends DnsCache { private static final NoopDnsCache INSTANCE = new NoopDnsCache(); diff --git a/smack-websocket/src/test/java/org/jivesoftware/smack/websocket/XmppWebSocketTransportModuleTest.java b/smack-websocket/src/test/java/org/jivesoftware/smack/websocket/XmppWebSocketTransportModuleTest.java index bc0ee1cd06..94a12d6831 100644 --- a/smack-websocket/src/test/java/org/jivesoftware/smack/websocket/XmppWebSocketTransportModuleTest.java +++ b/smack-websocket/src/test/java/org/jivesoftware/smack/websocket/XmppWebSocketTransportModuleTest.java @@ -17,7 +17,6 @@ package org.jivesoftware.smack.websocket; import static org.junit.jupiter.api.Assertions.assertNotNull; - import static org.mockito.Mockito.mock; import java.net.URI; diff --git a/smack-websocket/src/testFixtures/java/org/jivesoftware/smack/websocket/test/WebSocketFactoryServiceTestUtil.java b/smack-websocket/src/testFixtures/java/org/jivesoftware/smack/websocket/test/WebSocketFactoryServiceTestUtil.java index cb84133da4..8c580548c4 100644 --- a/smack-websocket/src/testFixtures/java/org/jivesoftware/smack/websocket/test/WebSocketFactoryServiceTestUtil.java +++ b/smack-websocket/src/testFixtures/java/org/jivesoftware/smack/websocket/test/WebSocketFactoryServiceTestUtil.java @@ -17,7 +17,6 @@ package org.jivesoftware.smack.websocket.test; import static org.junit.jupiter.api.Assertions.assertEquals; - import static org.mockito.Mockito.mock; import java.net.URISyntaxException;