Add CustomImportOrder checkstyle rule

And matching ImportOrder settings for Eclipse in
resources/eclipse/smack.importorder
omemo-legacy
Florian Schmaus 5 years ago
parent e86700b040
commit 08e897113d
  1. 7
      config/checkstyle.xml
  2. 8
      resources/eclipse/smack.importorder
  3. 3
      smack-android/src/main/java/org/jivesoftware/smack/android/AndroidSmackInitializer.java
  4. 10
      smack-android/src/main/java/org/jivesoftware/smackx/debugger/android/AndroidDebugger.java
  5. 16
      smack-bosh/src/main/java/org/jivesoftware/smack/bosh/XMPPBOSHConnection.java
  6. 7
      smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
  7. 13
      smack-core/src/main/java/org/jivesoftware/smack/ConnectionConfiguration.java
  8. 8
      smack-core/src/main/java/org/jivesoftware/smack/ReconnectionManager.java
  9. 29
      smack-core/src/main/java/org/jivesoftware/smack/SASLAuthentication.java
  10. 1
      smack-core/src/main/java/org/jivesoftware/smack/SmackException.java
  11. 1
      smack-core/src/main/java/org/jivesoftware/smack/SmackInitialization.java
  12. 2
      smack-core/src/main/java/org/jivesoftware/smack/StanzaCollector.java
  13. 4
      smack-core/src/main/java/org/jivesoftware/smack/SynchronizationPoint.java
  14. 6
      smack-core/src/main/java/org/jivesoftware/smack/XMPPConnection.java
  15. 1
      smack-core/src/main/java/org/jivesoftware/smack/XMPPException.java
  16. 2
      smack-core/src/main/java/org/jivesoftware/smack/compress/packet/Compress.java
  17. 7
      smack-core/src/main/java/org/jivesoftware/smack/debugger/AbstractDebugger.java
  18. 4
      smack-core/src/main/java/org/jivesoftware/smack/debugger/ConsoleDebugger.java
  19. 4
      smack-core/src/main/java/org/jivesoftware/smack/debugger/JulDebugger.java
  20. 6
      smack-core/src/main/java/org/jivesoftware/smack/debugger/ReflectionDebuggerFactory.java
  21. 1
      smack-core/src/main/java/org/jivesoftware/smack/debugger/SmackDebugger.java
  22. 4
      smack-core/src/main/java/org/jivesoftware/smack/debugger/SmackDebuggerFactory.java
  23. 1
      smack-core/src/main/java/org/jivesoftware/smack/filter/AbstractFromToMatchesFilter.java
  24. 1
      smack-core/src/main/java/org/jivesoftware/smack/filter/AbstractJidTypeFilter.java
  25. 1
      smack-core/src/main/java/org/jivesoftware/smack/filter/EmptyToMatcher.java
  26. 1
      smack-core/src/main/java/org/jivesoftware/smack/filter/FromMatchesFilter.java
  27. 1
      smack-core/src/main/java/org/jivesoftware/smack/filter/FromTypeFilter.java
  28. 1
      smack-core/src/main/java/org/jivesoftware/smack/filter/IQReplyFilter.java
  29. 2
      smack-core/src/main/java/org/jivesoftware/smack/filter/PacketExtensionFilter.java
  30. 2
      smack-core/src/main/java/org/jivesoftware/smack/filter/PacketTypeFilter.java
  31. 2
      smack-core/src/main/java/org/jivesoftware/smack/filter/StanzaExtensionFilter.java
  32. 4
      smack-core/src/main/java/org/jivesoftware/smack/filter/StanzaTypeFilter.java
  33. 1
      smack-core/src/main/java/org/jivesoftware/smack/filter/ToFilter.java
  34. 1
      smack-core/src/main/java/org/jivesoftware/smack/filter/ToMatchesFilter.java
  35. 1
      smack-core/src/main/java/org/jivesoftware/smack/filter/ToTypeFilter.java
  36. 1
      smack-core/src/main/java/org/jivesoftware/smack/filter/jidtype/AbstractJidTypeFilter.java
  37. 1
      smack-core/src/main/java/org/jivesoftware/smack/filter/jidtype/FromJidTypeFilter.java
  38. 1
      smack-core/src/main/java/org/jivesoftware/smack/packet/Message.java
  39. 1
      smack-core/src/main/java/org/jivesoftware/smack/packet/Presence.java
  40. 1
      smack-core/src/main/java/org/jivesoftware/smack/packet/StandardExtensionElement.java
  41. 9
      smack-core/src/main/java/org/jivesoftware/smack/packet/Stanza.java
  42. 1
      smack-core/src/main/java/org/jivesoftware/smack/parsing/StandardExtensionElementProvider.java
  43. 1
      smack-core/src/main/java/org/jivesoftware/smack/provider/BindIQProvider.java
  44. 1
      smack-core/src/main/java/org/jivesoftware/smack/provider/EmbeddedExtensionProvider.java
  45. 1
      smack-core/src/main/java/org/jivesoftware/smack/provider/ExtensionElementProvider.java
  46. 3
      smack-core/src/main/java/org/jivesoftware/smack/provider/IntrospectionProvider.java
  47. 1
      smack-core/src/main/java/org/jivesoftware/smack/provider/Provider.java
  48. 5
      smack-core/src/main/java/org/jivesoftware/smack/provider/ProviderFileLoader.java
  49. 3
      smack-core/src/main/java/org/jivesoftware/smack/provider/ProviderManager.java
  50. 5
      smack-core/src/main/java/org/jivesoftware/smack/proxy/HTTPProxySocketConnection.java
  51. 7
      smack-core/src/main/java/org/jivesoftware/smack/sasl/SASLMechanism.java
  52. 4
      smack-core/src/main/java/org/jivesoftware/smack/sasl/core/SASLAnonymous.java
  53. 1
      smack-core/src/main/java/org/jivesoftware/smack/sasl/core/ScramMechanism.java
  54. 2
      smack-core/src/main/java/org/jivesoftware/smack/util/DNSUtil.java
  55. 7
      smack-core/src/main/java/org/jivesoftware/smack/util/PacketParserUtils.java
  56. 1
      smack-core/src/main/java/org/jivesoftware/smack/util/ParserUtils.java
  57. 4
      smack-core/src/main/java/org/jivesoftware/smack/util/TLSUtils.java
  58. 3
      smack-core/src/main/java/org/jivesoftware/smack/util/XmlStringBuilder.java
  59. 7
      smack-core/src/main/java/org/jivesoftware/smack/util/dns/SmackDaneVerifier.java
  60. 1
      smack-core/src/main/java/org/jivesoftware/smack/util/stringencoder/Base32.java
  61. 3
      smack-core/src/test/java/org/jivesoftware/smack/DummyConnection.java
  62. 1
      smack-core/src/test/java/org/jivesoftware/smack/SmackExceptionTest.java
  63. 1
      smack-core/src/test/java/org/jivesoftware/smack/SmackFutureTest.java
  64. 1
      smack-core/src/test/java/org/jivesoftware/smack/StanzaCollectorTest.java
  65. 1
      smack-core/src/test/java/org/jivesoftware/smack/StanzaIdTest.java
  66. 2
      smack-core/src/test/java/org/jivesoftware/smack/ThreadedDummyConnection.java
  67. 3
      smack-core/src/test/java/org/jivesoftware/smack/filter/FromMatchesFilterTest.java
  68. 11
      smack-core/src/test/java/org/jivesoftware/smack/packet/MessageTest.java
  69. 7
      smack-core/src/test/java/org/jivesoftware/smack/packet/PresenceTest.java
  70. 1
      smack-core/src/test/java/org/jivesoftware/smack/packet/StreamErrorTest.java
  71. 1
      smack-core/src/test/java/org/jivesoftware/smack/packet/ToStringTest.java
  72. 3
      smack-core/src/test/java/org/jivesoftware/smack/parsing/ParsingExceptionTest.java
  73. 1
      smack-core/src/test/java/org/jivesoftware/smack/parsing/StandardExtensionElementParserTest.java
  74. 4
      smack-core/src/test/java/org/jivesoftware/smack/provider/ProviderConfigTest.java
  75. 1
      smack-core/src/test/java/org/jivesoftware/smack/provider/ProviderManagerTest.java
  76. 3
      smack-core/src/test/java/org/jivesoftware/smack/sasl/DigestMd5SaslTest.java
  77. 1
      smack-core/src/test/java/org/jivesoftware/smack/sasl/core/SCRAMSHA1MechanismTest.java
  78. 4
      smack-core/src/test/java/org/jivesoftware/smack/test/util/SmackTestSuite.java
  79. 1
      smack-core/src/test/java/org/jivesoftware/smack/test/util/TestUtils.java
  80. 2
      smack-core/src/test/java/org/jivesoftware/smack/test/util/WaitForPacketListener.java
  81. 6
      smack-core/src/test/java/org/jivesoftware/smack/util/PacketParserUtilsTest.java
  82. 6
      smack-debug-slf4j/src/main/java/org/jivesoftware/smackx/debugger/slf4j/SLF4JDebuggerFactory.java
  83. 1
      smack-debug-slf4j/src/main/java/org/jivesoftware/smackx/debugger/slf4j/SLF4JLoggingConnectionListener.java
  84. 1
      smack-debug-slf4j/src/main/java/org/jivesoftware/smackx/debugger/slf4j/SLF4JLoggingPacketListener.java
  85. 1
      smack-debug-slf4j/src/main/java/org/jivesoftware/smackx/debugger/slf4j/SLF4JRawXmlListener.java
  86. 11
      smack-debug-slf4j/src/main/java/org/jivesoftware/smackx/debugger/slf4j/SLF4JSmackDebugger.java
  87. 79
      smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebugger.java
  88. 1
      smack-debug/src/main/java/org/jivesoftware/smackx/debugger/LiteDebugger.java
  89. 1
      smack-experimental/src/main/java/org/jivesoftware/smackx/carbons/CarbonCopyReceivedListener.java
  90. 2
      smack-experimental/src/main/java/org/jivesoftware/smackx/carbons/CarbonManager.java
  91. 3
      smack-experimental/src/main/java/org/jivesoftware/smackx/carbons/packet/CarbonExtension.java
  92. 2
      smack-experimental/src/main/java/org/jivesoftware/smackx/carbons/provider/CarbonManagerProvider.java
  93. 1
      smack-experimental/src/main/java/org/jivesoftware/smackx/chat_markers/ChatMarkersManager.java
  94. 2
      smack-experimental/src/main/java/org/jivesoftware/smackx/chat_markers/provider/AcknowledgedProvider.java
  95. 2
      smack-experimental/src/main/java/org/jivesoftware/smackx/chat_markers/provider/DisplayedProvider.java
  96. 2
      smack-experimental/src/main/java/org/jivesoftware/smackx/chat_markers/provider/MarkableProvider.java
  97. 2
      smack-experimental/src/main/java/org/jivesoftware/smackx/chat_markers/provider/ReceivedProvider.java
  98. 1
      smack-experimental/src/main/java/org/jivesoftware/smackx/csi/ClientStateIndicationManager.java
  99. 2
      smack-experimental/src/main/java/org/jivesoftware/smackx/csi/packet/ClientStateIndication.java
  100. 2
      smack-experimental/src/main/java/org/jivesoftware/smackx/csi/provider/ClientStateIndicationFeatureProvider.java
  101. Some files were not shown because too many files have changed in this diff Show More

@ -187,5 +187,12 @@
, TYPE_EXTENSION_AND
"/>
</module>
<module name="CustomImportOrder">
<property name="customImportOrderRules"
value="STATIC###STANDARD_JAVA_PACKAGE###SPECIAL_IMPORTS###THIRD_PARTY_PACKAGE"/>
<property name="specialImportsRegExp" value="^org\.jivesoftware\.smack"/>
<property name="sortImportsInGroupAlphabetically" value="true"/>
<property name="separateLineBetweenGroups" value="true"/>
</module>
</module>
</module>

@ -0,0 +1,8 @@
#Organize Import Order
#Wed Jun 14 16:42:40 CEST 2017
5=
4=org.jivesoftware.smackx
3=org.jivesoftware.smack
2=javax
1=java
0=\#

@ -18,7 +18,6 @@ package org.jivesoftware.smack.android;
import java.util.List;
import org.apache.http.conn.ssl.StrictHostnameVerifier;
import org.jivesoftware.smack.SmackConfiguration;
import org.jivesoftware.smack.initializer.SmackInitializer;
import org.jivesoftware.smack.util.stringencoder.Base64;
@ -26,6 +25,8 @@ import org.jivesoftware.smack.util.stringencoder.Base64UrlSafeEncoder;
import org.jivesoftware.smack.util.stringencoder.android.AndroidBase64Encoder;
import org.jivesoftware.smack.util.stringencoder.android.AndroidBase64UrlSafeEncoder;
import org.apache.http.conn.ssl.StrictHostnameVerifier;
public class AndroidSmackInitializer implements SmackInitializer {
@Override

@ -1,6 +1,6 @@
/**
*
* Copyright © 2014 Florian Schmaus
* Copyright © 2014-2017 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -16,14 +16,14 @@
*/
package org.jivesoftware.smackx.debugger.android;
import org.jivesoftware.smack.debugger.AbstractDebugger;
import java.io.Reader;
import java.io.Writer;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.debugger.AbstractDebugger;
import android.util.Log;
import java.io.Reader;
import java.io.Writer;
/**
* Very simple debugger that prints to the android log the sent and received stanzas.
* <p>

@ -27,25 +27,22 @@ import java.util.logging.Logger;
import org.jivesoftware.smack.AbstractXMPPConnection;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.SmackException.ConnectionException;
import org.jivesoftware.smack.XMPPException.StreamErrorException;
import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.XMPPException.StreamErrorException;
import org.jivesoftware.smack.packet.Element;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.Nonza;
import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.XMPPError;
import org.jivesoftware.smack.sasl.packet.SaslStreamElements.SASLFailure;
import org.jivesoftware.smack.sasl.packet.SaslStreamElements.Success;
import org.jivesoftware.smack.util.PacketParserUtils;
import org.jxmpp.jid.DomainBareJid;
import org.jxmpp.jid.parts.Resourcepart;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserFactory;
import org.igniterealtime.jbosh.AbstractBody;
import org.igniterealtime.jbosh.BOSHClient;
import org.igniterealtime.jbosh.BOSHClientConfig;
@ -58,6 +55,11 @@ import org.igniterealtime.jbosh.BOSHMessageEvent;
import org.igniterealtime.jbosh.BodyQName;
import org.igniterealtime.jbosh.ComposableBody;
import org.jxmpp.jid.DomainBareJid;
import org.jxmpp.jid.parts.Resourcepart;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserFactory;
/**
* Creates a connection to an XMPP server via HTTP binding.
* This is specified in the XEP-0206: XMPP Over BOSH.

@ -60,15 +60,15 @@ import org.jivesoftware.smack.filter.StanzaIdFilter;
import org.jivesoftware.smack.iqrequest.IQRequestHandler;
import org.jivesoftware.smack.packet.Bind;
import org.jivesoftware.smack.packet.ErrorIQ;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.Mechanisms;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.Nonza;
import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smack.packet.Session;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.StartTls;
import org.jivesoftware.smack.packet.Nonza;
import org.jivesoftware.smack.packet.StreamError;
import org.jivesoftware.smack.packet.XMPPError;
import org.jivesoftware.smack.parsing.ParsingExceptionCallback;
@ -83,6 +83,7 @@ import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.util.SmackExecutorThreadFactory;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smack.util.dns.HostAddress;
import org.jxmpp.jid.DomainBareJid;
import org.jxmpp.jid.EntityFullJid;
import org.jxmpp.jid.Jid;

@ -24,6 +24,12 @@ import java.util.Collections;
import java.util.HashSet;
import java.util.Set;
import javax.net.SocketFactory;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;
import javax.net.ssl.X509TrustManager;
import javax.security.auth.callback.CallbackHandler;
import org.jivesoftware.smack.packet.Session;
import org.jivesoftware.smack.proxy.ProxyInfo;
import org.jivesoftware.smack.sasl.SASLMechanism;
@ -31,18 +37,13 @@ import org.jivesoftware.smack.sasl.core.SASLAnonymous;
import org.jivesoftware.smack.util.CollectionUtil;
import org.jivesoftware.smack.util.Objects;
import org.jivesoftware.smack.util.StringUtils;
import org.jxmpp.jid.DomainBareJid;
import org.jxmpp.jid.EntityBareJid;
import org.jxmpp.jid.impl.JidCreate;
import org.jxmpp.jid.parts.Resourcepart;
import org.jxmpp.stringprep.XmppStringprepException;
import javax.net.SocketFactory;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.SSLContext;
import javax.net.ssl.X509TrustManager;
import javax.security.auth.callback.CallbackHandler;
/**
* Configuration to use while establishing the connection to the server.
*

@ -16,10 +16,6 @@
*/
package org.jivesoftware.smack;
import org.jivesoftware.smack.XMPPException.StreamErrorException;
import org.jivesoftware.smack.packet.StreamError;
import org.jivesoftware.smack.util.Async;
import java.io.IOException;
import java.lang.ref.WeakReference;
import java.util.Map;
@ -28,6 +24,10 @@ import java.util.WeakHashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.jivesoftware.smack.XMPPException.StreamErrorException;
import org.jivesoftware.smack.packet.StreamError;
import org.jivesoftware.smack.util.Async;
/**
* Handles the automatic reconnection process. Every time a connection is dropped without
* the application explicitly closing it, the manager automatically tries to reconnect to

@ -17,20 +17,6 @@
package org.jivesoftware.smack;
import org.jivesoftware.smack.SmackException.NoResponseException;
import org.jivesoftware.smack.XMPPException.XMPPErrorException;
import org.jivesoftware.smack.packet.Mechanisms;
import org.jivesoftware.smack.sasl.SASLErrorException;
import org.jivesoftware.smack.sasl.SASLMechanism;
import org.jivesoftware.smack.sasl.core.ScramSha1PlusMechanism;
import org.jivesoftware.smack.sasl.packet.SaslStreamElements.SASLFailure;
import org.jivesoftware.smack.sasl.packet.SaslStreamElements.Success;
import org.jxmpp.jid.DomainBareJid;
import org.jxmpp.jid.EntityBareJid;
import javax.net.ssl.SSLSession;
import javax.security.auth.callback.CallbackHandler;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collections;
@ -42,6 +28,21 @@ import java.util.Map;
import java.util.Set;
import java.util.logging.Logger;
import javax.net.ssl.SSLSession;
import javax.security.auth.callback.CallbackHandler;
import org.jivesoftware.smack.SmackException.NoResponseException;
import org.jivesoftware.smack.XMPPException.XMPPErrorException;
import org.jivesoftware.smack.packet.Mechanisms;
import org.jivesoftware.smack.sasl.SASLErrorException;
import org.jivesoftware.smack.sasl.SASLMechanism;
import org.jivesoftware.smack.sasl.core.ScramSha1PlusMechanism;
import org.jivesoftware.smack.sasl.packet.SaslStreamElements.SASLFailure;
import org.jivesoftware.smack.sasl.packet.SaslStreamElements.Success;
import org.jxmpp.jid.DomainBareJid;
import org.jxmpp.jid.EntityBareJid;
/**
* <p>This class is responsible authenticating the user using SASL, binding the resource
* to the connection and establishing a session with the server.</p>

@ -21,6 +21,7 @@ import java.util.List;
import org.jivesoftware.smack.filter.StanzaFilter;
import org.jivesoftware.smack.util.dns.HostAddress;
import org.jxmpp.jid.Jid;
/**

@ -38,6 +38,7 @@ import org.jivesoftware.smack.sasl.core.SCRAMSHA1Mechanism;
import org.jivesoftware.smack.sasl.core.ScramSha1PlusMechanism;
import org.jivesoftware.smack.util.FileUtils;
import org.jivesoftware.smack.util.StringUtils;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
import org.xmlpull.v1.XmlPullParserFactory;

@ -20,8 +20,8 @@ package org.jivesoftware.smack;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.TimeUnit;
import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.SmackException.NoResponseException;
import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.XMPPException.XMPPErrorException;
import org.jivesoftware.smack.filter.StanzaFilter;
import org.jivesoftware.smack.packet.Stanza;

@ -22,9 +22,9 @@ import java.util.concurrent.locks.Lock;
import org.jivesoftware.smack.SmackException.NoResponseException;
import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.packet.TopLevelStreamElement;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.Nonza;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.TopLevelStreamElement;
public class SynchronizationPoint<E extends Exception> {

@ -16,16 +16,16 @@
*/
package org.jivesoftware.smack;
import org.jivesoftware.smack.SmackException.NoResponseException;
import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.filter.IQReplyFilter;
import org.jivesoftware.smack.filter.StanzaFilter;
import org.jivesoftware.smack.iqrequest.IQRequestHandler;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.Nonza;
import org.jivesoftware.smack.packet.Stanza;
import org.jxmpp.jid.DomainBareJid;
import org.jxmpp.jid.EntityFullJid;

@ -21,6 +21,7 @@ import org.jivesoftware.smack.packet.Nonza;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.StreamError;
import org.jivesoftware.smack.packet.XMPPError;
import org.jxmpp.jid.Jid;
/**

@ -19,8 +19,8 @@ package org.jivesoftware.smack.compress.packet;
import java.util.Collections;
import java.util.List;
import org.jivesoftware.smack.packet.Nonza;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.Nonza;
import org.jivesoftware.smack.util.XmlStringBuilder;
public class Compress implements Nonza {

@ -16,6 +16,9 @@
*/
package org.jivesoftware.smack.debugger;
import java.io.Reader;
import java.io.Writer;
import org.jivesoftware.smack.ConnectionListener;
import org.jivesoftware.smack.StanzaListener;
import org.jivesoftware.smack.XMPPConnection;
@ -24,10 +27,8 @@ import org.jivesoftware.smack.util.ObservableReader;
import org.jivesoftware.smack.util.ObservableWriter;
import org.jivesoftware.smack.util.ReaderListener;
import org.jivesoftware.smack.util.WriterListener;
import org.jxmpp.jid.EntityFullJid;
import java.io.Reader;
import java.io.Writer;
import org.jxmpp.jid.EntityFullJid;
public abstract class AbstractDebugger implements SmackDebugger {

@ -16,8 +16,6 @@
*/
package org.jivesoftware.smack.debugger;
import org.jivesoftware.smack.XMPPConnection;
import java.io.PrintWriter;
import java.io.Reader;
import java.io.StringWriter;
@ -25,6 +23,8 @@ import java.io.Writer;
import java.text.SimpleDateFormat;
import java.util.Date;
import org.jivesoftware.smack.XMPPConnection;
/**
* Very simple debugger that prints to the console (stdout) the sent and received stanzas. Use
* this debugger with caution since printing to the console is an expensive operation that may

@ -16,13 +16,13 @@
*/
package org.jivesoftware.smack.debugger;
import org.jivesoftware.smack.XMPPConnection;
import java.io.Reader;
import java.io.Writer;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.jivesoftware.smack.XMPPConnection;
/**
* Very simple debugger that prints to the console (stdout) the sent and received stanzas. Use
* this debugger with caution since printing to the console is an expensive operation that may

@ -18,15 +18,15 @@
package org.jivesoftware.smack.debugger;
import org.jivesoftware.smack.SmackConfiguration;
import org.jivesoftware.smack.XMPPConnection;
import java.io.Reader;
import java.io.Writer;
import java.lang.reflect.Constructor;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.jivesoftware.smack.SmackConfiguration;
import org.jivesoftware.smack.XMPPConnection;
public class ReflectionDebuggerFactory implements SmackDebuggerFactory {
private static final Logger LOGGER = Logger.getLogger(ReflectionDebuggerFactory.class.getName());
private static final String DEBUGGER_CLASS_PROPERTY_NAME = "smack.debuggerClass";

@ -21,6 +21,7 @@ import java.io.Reader;
import java.io.Writer;
import org.jivesoftware.smack.StanzaListener;
import org.jxmpp.jid.EntityFullJid;
/**

@ -18,11 +18,11 @@
package org.jivesoftware.smack.debugger;
import org.jivesoftware.smack.XMPPConnection;
import java.io.Reader;
import java.io.Writer;
import org.jivesoftware.smack.XMPPConnection;
public interface SmackDebuggerFactory {
/**
* Initialize the new SmackDebugger instance.

@ -17,6 +17,7 @@
package org.jivesoftware.smack.filter;
import org.jivesoftware.smack.packet.Stanza;
import org.jxmpp.jid.Jid;
public abstract class AbstractFromToMatchesFilter implements StanzaFilter {

@ -17,6 +17,7 @@
package org.jivesoftware.smack.filter;
import org.jivesoftware.smack.packet.Stanza;
import org.jxmpp.jid.Jid;
public abstract class AbstractJidTypeFilter implements StanzaFilter {

@ -17,6 +17,7 @@
package org.jivesoftware.smack.filter;
import org.jivesoftware.smack.packet.Stanza;
import org.jxmpp.jid.Jid;
public final class EmptyToMatcher implements StanzaFilter {

@ -17,6 +17,7 @@
package org.jivesoftware.smack.filter;
import org.jivesoftware.smack.packet.Stanza;
import org.jxmpp.jid.Jid;
/**

@ -17,6 +17,7 @@
package org.jivesoftware.smack.filter;
import org.jivesoftware.smack.packet.Stanza;
import org.jxmpp.jid.Jid;
public final class FromTypeFilter extends AbstractJidTypeFilter {

@ -22,6 +22,7 @@ import java.util.logging.Logger;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.Stanza;
import org.jxmpp.jid.DomainBareJid;
import org.jxmpp.jid.EntityFullJid;
import org.jxmpp.jid.Jid;

@ -17,8 +17,8 @@
package org.jivesoftware.smack.filter;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.util.StringUtils;
/**

@ -18,8 +18,8 @@
package org.jivesoftware.smack.filter;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smack.packet.Stanza;
/**
* Filters for packets of a particular type. The type is given as a Class object, so

@ -17,8 +17,8 @@
package org.jivesoftware.smack.filter;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.util.StringUtils;
/**

@ -17,10 +17,10 @@
package org.jivesoftware.smack.filter;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.Stanza;
/**
* Filters for Stanzas of a particular type. The type is given as a Class object, so

@ -17,6 +17,7 @@
package org.jivesoftware.smack.filter;
import org.jivesoftware.smack.packet.Stanza;
import org.jxmpp.jid.Jid;
/**

@ -17,6 +17,7 @@
package org.jivesoftware.smack.filter;
import org.jivesoftware.smack.packet.Stanza;
import org.jxmpp.jid.Jid;
public final class ToMatchesFilter extends AbstractFromToMatchesFilter {

@ -17,6 +17,7 @@
package org.jivesoftware.smack.filter;
import org.jivesoftware.smack.packet.Stanza;
import org.jxmpp.jid.Jid;
public final class ToTypeFilter extends AbstractJidTypeFilter {

@ -19,6 +19,7 @@ package org.jivesoftware.smack.filter.jidtype;
import org.jivesoftware.smack.filter.StanzaFilter;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.util.Objects;
import org.jxmpp.jid.Jid;
/**

@ -17,6 +17,7 @@
package org.jivesoftware.smack.filter.jidtype;
import org.jivesoftware.smack.packet.Stanza;
import org.jxmpp.jid.Jid;
/**

@ -26,6 +26,7 @@ import java.util.Set;
import org.jivesoftware.smack.util.TypedCloneable;
import org.jivesoftware.smack.util.XmlStringBuilder;
import org.jxmpp.jid.Jid;
import org.jxmpp.jid.impl.JidCreate;
import org.jxmpp.stringprep.XmppStringprepException;

@ -24,6 +24,7 @@ import org.jivesoftware.smack.util.Objects;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smack.util.TypedCloneable;
import org.jivesoftware.smack.util.XmlStringBuilder;
import org.jxmpp.jid.Jid;
/**

@ -25,6 +25,7 @@ import org.jivesoftware.smack.util.MultiMap;
import org.jivesoftware.smack.util.Objects;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smack.util.XmlStringBuilder;
import org.jxmpp.util.XmppStringUtils;
/**

@ -19,19 +19,20 @@ package org.jivesoftware.smack.packet;
import static org.jivesoftware.smack.util.StringUtils.requireNotNullOrEmpty;
import java.util.Collection;
import java.util.List;
import java.util.Locale;
import org.jivesoftware.smack.packet.id.StanzaIdUtil;
import org.jivesoftware.smack.util.MultiMap;
import org.jivesoftware.smack.util.PacketUtil;
import org.jivesoftware.smack.util.XmlStringBuilder;
import org.jxmpp.jid.Jid;
import org.jxmpp.jid.impl.JidCreate;
import org.jxmpp.stringprep.XmppStringprepException;
import org.jxmpp.util.XmppStringUtils;
import java.util.Collection;
import java.util.List;
import java.util.Locale;
/**
* Base class for XMPP Stanzas, which are called Stanza(/Packet) in older versions of Smack (i.e. &lt; 4.1).
* <p>

@ -25,6 +25,7 @@ import org.jivesoftware.smack.packet.StandardExtensionElement.Builder;
import org.jivesoftware.smack.provider.ExtensionElementProvider;
import org.jivesoftware.smack.util.ParserUtils;
import org.jivesoftware.smack.util.StringUtils;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;

@ -20,6 +20,7 @@ import java.io.IOException;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.packet.Bind;
import org.jxmpp.jid.EntityFullJid;
import org.jxmpp.jid.impl.JidCreate;
import org.jxmpp.jid.parts.Resourcepart;

@ -23,6 +23,7 @@ import java.util.Map;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.util.PacketParserUtils;
import org.xmlpull.v1.XmlPullParser;
/**

@ -17,7 +17,6 @@
package org.jivesoftware.smack.provider;
import org.jivesoftware.smack.packet.ExtensionElement;
/**

@ -20,9 +20,10 @@ import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.util.ParserUtils;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;

@ -19,6 +19,7 @@ package org.jivesoftware.smack.provider;
import org.jivesoftware.smack.packet.Element;
import org.jivesoftware.smack.util.ParserUtils;
import org.xmlpull.v1.XmlPullParser;
public abstract class Provider<E extends Element> {

@ -24,10 +24,11 @@ import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.xmlpull.v1.XmlPullParserFactory;
import org.jivesoftware.smack.packet.IQ;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserFactory;
/**
* Loads the {@link IQProvider} and {@link ExtensionElementProvider} information from a standard provider file in preparation

@ -23,9 +23,10 @@ import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import org.jivesoftware.smack.SmackConfiguration;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.util.StringUtils;
import org.jxmpp.util.XmppStringUtils;
/**

@ -23,12 +23,11 @@ import java.io.StringReader;
import java.net.HttpURLConnection;
import java.net.InetSocketAddress;
import java.net.Socket;
import org.jivesoftware.smack.util.stringencoder.Base64;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jivesoftware.smack.util.stringencoder.Base64;
/**
* HTTP Proxy Socket Connection which connects the socket using a HTTP Proxy.
*

@ -16,6 +16,9 @@
*/
package org.jivesoftware.smack.sasl;
import javax.net.ssl.SSLSession;
import javax.security.auth.callback.CallbackHandler;
import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.SmackException.NotConnectedException;
@ -25,12 +28,10 @@ import org.jivesoftware.smack.sasl.packet.SaslStreamElements.Response;
import org.jivesoftware.smack.util.StringTransformer;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smack.util.stringencoder.Base64;
import org.jxmpp.jid.DomainBareJid;
import org.jxmpp.jid.EntityBareJid;
import javax.net.ssl.SSLSession;
import javax.security.auth.callback.CallbackHandler;
/**
* Base class for SASL mechanisms.
* Subclasses will likely want to implement their own versions of these methods:

@ -16,11 +16,11 @@
*/
package org.jivesoftware.smack.sasl.core;
import javax.security.auth.callback.CallbackHandler;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.sasl.SASLMechanism;
import javax.security.auth.callback.CallbackHandler;
/**
* Implementation of the SASL ANONYMOUS mechanism.
*

@ -32,6 +32,7 @@ import org.jivesoftware.smack.util.ByteUtils;
import org.jivesoftware.smack.util.SHA1;
import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smack.util.stringencoder.Base64;
import org.jxmpp.util.cache.Cache;
import org.jxmpp.util.cache.LruCache;

@ -27,9 +27,9 @@ import java.util.logging.Logger;
import org.jivesoftware.smack.ConnectionConfiguration.DnssecMode;
import org.jivesoftware.smack.util.dns.DNSResolver;
import org.jivesoftware.smack.util.dns.SmackDaneProvider;
import org.jivesoftware.smack.util.dns.HostAddress;
import org.jivesoftware.smack.util.dns.SRVRecord;
import org.jivesoftware.smack.util.dns.SmackDaneProvider;
/**
* Utility class to perform DNS lookups for XMPP services.

@ -31,21 +31,22 @@ import java.util.logging.Logger;
import org.jivesoftware.smack.compress.packet.Compress;
import org.jivesoftware.smack.packet.EmptyResultIQ;
import org.jivesoftware.smack.packet.ErrorIQ;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.Presence;
import org.jivesoftware.smack.packet.Session;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.StartTls;
import org.jivesoftware.smack.packet.StreamError;
import org.jivesoftware.smack.packet.UnparsedIQ;
import org.jivesoftware.smack.packet.XMPPError;
import org.jivesoftware.smack.parsing.StandardExtensionElementProvider;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.provider.ExtensionElementProvider;
import org.jivesoftware.smack.provider.IQProvider;
import org.jivesoftware.smack.provider.ProviderManager;
import org.jivesoftware.smack.sasl.packet.SaslStreamElements.SASLFailure;
import org.jxmpp.jid.Jid;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;

@ -24,6 +24,7 @@ import java.util.Date;
import java.util.Locale;
import org.jivesoftware.smack.SmackException;
import org.jxmpp.jid.EntityBareJid;
import org.jxmpp.jid.EntityFullJid;
import org.jxmpp.jid.EntityJid;

@ -20,6 +20,8 @@ import java.security.KeyManagementException;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.security.SecureRandom;
import java.security.cert.Certificate;
import java.security.cert.CertificateEncodingException;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.Arrays;
@ -33,8 +35,6 @@ import javax.net.ssl.SSLSession;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.TrustManager;
import javax.net.ssl.X509TrustManager;
import java.security.cert.Certificate;
import java.security.cert.CertificateEncodingException;
import org.jivesoftware.smack.ConnectionConfiguration;
import org.jivesoftware.smack.SmackException.SecurityNotPossibleException;

@ -22,8 +22,9 @@ import java.util.Collection;
import java.util.Date;
import org.jivesoftware.smack.packet.Element;
import org.jivesoftware.smack.packet.NamedElement;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.NamedElement;
import org.jxmpp.util.XmppDateTime;
public class XmlStringBuilder implements Appendable, CharSequence {

@ -16,13 +16,14 @@
*/
package org.jivesoftware.smack.util.dns;
import java.security.KeyManagementException;
import java.security.SecureRandom;
import java.security.cert.CertificateException;
import javax.net.ssl.KeyManager;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.X509TrustManager;
import java.security.KeyManagementException;
import java.security.SecureRandom;
import java.security.cert.CertificateException;
/**
* Implementations of this interface define a class that is capable of enabling DANE on a connection.

@ -16,7 +16,6 @@
*/
package org.jivesoftware.smack.util.stringencoder;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
import java.io.IOException;

@ -25,9 +25,10 @@ import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.TimeUnit;
import org.jivesoftware.smack.packet.ExtensionElement;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.Nonza;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.TopLevelStreamElement;
import org.jxmpp.jid.EntityFullJid;
import org.jxmpp.jid.JidTestUtil;
import org.jxmpp.jid.impl.JidCreate;

@ -26,6 +26,7 @@ import java.util.List;
import org.jivesoftware.smack.SmackException.ConnectionException;
import org.jivesoftware.smack.util.dns.HostAddress;
import org.junit.Test;
public class SmackExceptionTest {

@ -26,6 +26,7 @@ import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.SmackFuture.InternalSmackFuture;
import org.jivesoftware.smack.SmackFuture.SimpleInternalSmackFuture;
import org.jivesoftware.smack.packet.Stanza;
import org.junit.Test;
public class SmackFutureTest {

@ -21,6 +21,7 @@ import static org.junit.Assert.assertNull;
import org.jivesoftware.smack.filter.StanzaFilter;
import org.jivesoftware.smack.packet.Stanza;
import org.junit.Test;
public class StanzaCollectorTest

@ -22,6 +22,7 @@ import static org.junit.Assert.assertTrue;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.TestIQ;
import org.jivesoftware.smack.util.StringUtils;
import org.junit.Test;
public class StanzaIdTest {

@ -25,9 +25,9 @@ import java.util.logging.Logger;
import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.IQ.Type;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.IQ.Type;
/**
* A threaded dummy connection.

@ -16,11 +16,12 @@
*/
package org.jivesoftware.smack.filter;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.jivesoftware.smack.packet.Message;
import org.jivesoftware.smack.packet.Stanza;
import org.junit.Test;
import org.jxmpp.jid.EntityFullJid;
import org.jxmpp.jid.Jid;

@ -21,14 +21,15 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.jivesoftware.smack.test.util.XmlUnitUtils;
import org.junit.Test;
import org.xml.sax.SAXException;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.ArrayList;
import org.jivesoftware.smack.test.util.XmlUnitUtils;
import org.junit.Test;
import org.xml.sax.SAXException;
public class MessageTest {

@ -16,17 +16,16 @@
*/
package org.jivesoftware.smack.packet;
import org.junit.Test;
import static org.custommonkey.xmlunit.XMLAssert.assertXMLEqual;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.xml.sax.SAXException;
import java.io.IOException;
import org.junit.Test;
import org.xml.sax.SAXException;
public class PresenceTest {
@Test
public void setPresenceTypeTest() throws IOException, SAXException {

@ -22,6 +22,7 @@ import static org.junit.Assert.fail;
import org.jivesoftware.smack.packet.StreamError.Condition;
import org.jivesoftware.smack.util.PacketParserUtils;
import org.junit.Test;
import org.xmlpull.v1.XmlPullParser;

@ -19,6 +19,7 @@ package org.jivesoftware.smack.packet;
import static org.junit.Assert.assertEquals;
import org.jivesoftware.smack.packet.Presence.Mode;
import org.junit.Test;
import org.jxmpp.jid.JidTestUtil;
import org.jxmpp.stringprep.XmppStringprepException;

3