mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 09:09:38 +02:00
Enable werror for javadoc and fix javadoc issues
This commit is contained in:
parent
4249c1a845
commit
1a3067c89b
323 changed files with 2929 additions and 2704 deletions
|
@ -36,7 +36,7 @@ public class PacketReaderTest extends SmackTestCase {
|
|||
/**
|
||||
* Constructor for PacketReaderTest.
|
||||
*
|
||||
* @param arg0
|
||||
* @param arg0 TODO javadoc me please
|
||||
*/
|
||||
public PacketReaderTest(String arg0) {
|
||||
super(arg0);
|
||||
|
|
|
@ -38,7 +38,7 @@ public class RosterSmackTest extends SmackTestCase {
|
|||
|
||||
/**
|
||||
* Constructor for RosterSmackTest.
|
||||
* @param name
|
||||
* @param name TODO javadoc me please
|
||||
*/
|
||||
public RosterSmackTest(String name) {
|
||||
super(name);
|
||||
|
|
|
@ -24,7 +24,7 @@ public class MockPacket extends Packet {
|
|||
|
||||
/**
|
||||
* Returns null always.
|
||||
* @return null
|
||||
* @return null TODO javadoc me please
|
||||
*/
|
||||
public String toXML() {
|
||||
return null;
|
||||
|
|
|
@ -31,7 +31,7 @@ public class PrivacyProviderTest extends SmackTestCase {
|
|||
|
||||
/**
|
||||
* Constructor for PrivacyTest.
|
||||
* @param arg0
|
||||
* @param arg0 TODO javadoc me please
|
||||
*/
|
||||
public PrivacyProviderTest(String arg0) {
|
||||
super(arg0);
|
||||
|
|
|
@ -503,7 +503,7 @@ public abstract class SmackTestCase extends TestCase {
|
|||
/**
|
||||
* Subscribes all connections with each other: They all become friends
|
||||
*
|
||||
* @throws XMPPException
|
||||
* @throws XMPPException if an XMPP protocol error was received.
|
||||
*/
|
||||
protected void letsAllBeFriends() throws XMPPException {
|
||||
ConnectionUtils.letsAllBeFriends(connections);
|
||||
|
|
|
@ -488,9 +488,9 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
|||
*
|
||||
* @throws XMPPException if an error occurs on the XMPP protocol level.
|
||||
* @throws SmackException if an error occurs somewhere else besides XMPP protocol level.
|
||||
* @throws IOException
|
||||
* @throws IOException if an I/O error occured.
|
||||
* @return a reference to this object, to chain <code>connect()</code> with <code>login()</code>.
|
||||
* @throws InterruptedException
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
public synchronized AbstractXMPPConnection connect() throws SmackException, IOException, XMPPException, InterruptedException {
|
||||
// Check if not already connected
|
||||
|
@ -528,10 +528,10 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
|||
* way of XMPP connection establishment. Implementations are required to perform an automatic
|
||||
* login if the previous connection state was logged (authenticated).
|
||||
*
|
||||
* @throws SmackException
|
||||
* @throws IOException
|
||||
* @throws XMPPException
|
||||
* @throws InterruptedException
|
||||
* @throws SmackException if Smack detected an exceptional situation.
|
||||
* @throws IOException if an I/O error occured.
|
||||
* @throws XMPPException if an XMPP protocol error was received.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
protected abstract void connectInternal() throws SmackException, IOException, XMPPException, InterruptedException;
|
||||
|
||||
|
@ -563,7 +563,7 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
|||
* @throws XMPPException if an error occurs on the XMPP protocol level.
|
||||
* @throws SmackException if an error occurs somewhere else besides XMPP protocol level.
|
||||
* @throws IOException if an I/O error occurs during login.
|
||||
* @throws InterruptedException
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
public synchronized void login() throws XMPPException, SmackException, IOException, InterruptedException {
|
||||
// The previously used username, password and resource take over precedence over the
|
||||
|
@ -578,12 +578,12 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
|||
* Same as {@link #login(CharSequence, String, Resourcepart)}, but takes the resource from the connection
|
||||
* configuration.
|
||||
*
|
||||
* @param username
|
||||
* @param password
|
||||
* @throws XMPPException
|
||||
* @throws SmackException
|
||||
* @throws IOException
|
||||
* @throws InterruptedException
|
||||
* @param username TODO javadoc me please
|
||||
* @param password TODO javadoc me please
|
||||
* @throws XMPPException if an XMPP protocol error was received.
|
||||
* @throws SmackException if Smack detected an exceptional situation.
|
||||
* @throws IOException if an I/O error occured.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
* @see #login
|
||||
*/
|
||||
public synchronized void login(CharSequence username, String password) throws XMPPException, SmackException,
|
||||
|
@ -595,13 +595,13 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
|||
* Login with the given username (authorization identity). You may omit the password if a callback handler is used.
|
||||
* If resource is null, then the server will generate one.
|
||||
*
|
||||
* @param username
|
||||
* @param password
|
||||
* @param resource
|
||||
* @throws XMPPException
|
||||
* @throws SmackException
|
||||
* @throws IOException
|
||||
* @throws InterruptedException
|
||||
* @param username TODO javadoc me please
|
||||
* @param password TODO javadoc me please
|
||||
* @param resource TODO javadoc me please
|
||||
* @throws XMPPException if an XMPP protocol error was received.
|
||||
* @throws SmackException if Smack detected an exceptional situation.
|
||||
* @throws IOException if an I/O error occured.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
* @see #login
|
||||
*/
|
||||
public synchronized void login(CharSequence username, String password, Resourcepart resource) throws XMPPException,
|
||||
|
@ -847,7 +847,7 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
|||
* presence stanza with whatever data is set.
|
||||
*
|
||||
* @param unavailablePresence the optional presence stanza to send during shutdown.
|
||||
* @throws NotConnectedException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
*/
|
||||
public synchronized void disconnect(Presence unavailablePresence) throws NotConnectedException {
|
||||
if (unavailablePresence != null) {
|
||||
|
@ -1277,7 +1277,7 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
|||
* they are a match with the filter.
|
||||
*
|
||||
* @param stanza the stanza to process.
|
||||
* @throws InterruptedException
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
protected void processStanza(final Stanza stanza) throws InterruptedException {
|
||||
assert stanza != null;
|
||||
|
|
|
@ -40,8 +40,8 @@ public abstract class AbstractXmppNioConnection extends AbstractXmppStateMachine
|
|||
* Set the interest Ops of a SelectionKey. Since Java's NIO interestOps(int) can block at any time, we use a queue
|
||||
* to perform the actual operation in the reactor where we can perform this operation non-blocking.
|
||||
*
|
||||
* @param selectionKey
|
||||
* @param interestOps
|
||||
* @param selectionKey TODO javadoc me please
|
||||
* @param interestOps TODO javadoc me please
|
||||
*/
|
||||
protected void setInterestOps(SelectionKey selectionKey, int interestOps) {
|
||||
SMACK_REACTOR.setInterestOps(selectionKey, interestOps);
|
||||
|
|
|
@ -544,7 +544,7 @@ public abstract class ConnectionConfiguration {
|
|||
/**
|
||||
* Check if the given SASL mechansism is enabled in this connection configuration.
|
||||
*
|
||||
* @param saslMechanism
|
||||
* @param saslMechanism TODO javadoc me please
|
||||
* @return true if the given SASL mechanism is enabled, false otherwise.
|
||||
*/
|
||||
public boolean isEnabledSaslMechanism(String saslMechanism) {
|
||||
|
@ -642,8 +642,8 @@ public abstract class ConnectionConfiguration {
|
|||
* Although most services will follow that pattern.
|
||||
* </p>
|
||||
*
|
||||
* @param jid
|
||||
* @param password
|
||||
* @param jid TODO javadoc me please
|
||||
* @param password TODO javadoc me please
|
||||
* @return a reference to this builder.
|
||||
* @since 4.4.0
|
||||
*/
|
||||
|
@ -916,7 +916,7 @@ public abstract class ConnectionConfiguration {
|
|||
/**
|
||||
* Set the enabled SSL/TLS protocols.
|
||||
*
|
||||
* @param enabledSSLProtocols
|
||||
* @param enabledSSLProtocols TODO javadoc me please
|
||||
* @return a reference to this builder.
|
||||
*/
|
||||
public B setEnabledSSLProtocols(String[] enabledSSLProtocols) {
|
||||
|
@ -939,7 +939,7 @@ public abstract class ConnectionConfiguration {
|
|||
* Set the HostnameVerifier used to verify the hostname of SSLSockets used by XMPP connections
|
||||
* created with this ConnectionConfiguration.
|
||||
*
|
||||
* @param verifier
|
||||
* @param verifier TODO javadoc me please
|
||||
* @return a reference to this builder.
|
||||
*/
|
||||
public B setHostnameVerifier(HostnameVerifier verifier) {
|
||||
|
|
|
@ -61,7 +61,7 @@ public final class ReconnectionManager {
|
|||
/**
|
||||
* Get a instance of ReconnectionManager for the given connection.
|
||||
*
|
||||
* @param connection
|
||||
* @param connection TODO javadoc me please
|
||||
* @return a ReconnectionManager for the connection.
|
||||
*/
|
||||
public static synchronized ReconnectionManager getInstanceFor(AbstractXMPPConnection connection) {
|
||||
|
@ -90,7 +90,7 @@ public final class ReconnectionManager {
|
|||
* Set if the automatic reconnection mechanism will be enabled per default for new XMPP connections. The default is
|
||||
* 'false'.
|
||||
*
|
||||
* @param enabled
|
||||
* @param enabled TODO javadoc me please
|
||||
*/
|
||||
public static void setEnabledPerDefault(boolean enabled) {
|
||||
enabledPerDefault = enabled;
|
||||
|
@ -132,7 +132,7 @@ public final class ReconnectionManager {
|
|||
/**
|
||||
* Set the default Reconnection Policy to use.
|
||||
*
|
||||
* @param reconnectionPolicy
|
||||
* @param reconnectionPolicy TODO javadoc me please
|
||||
*/
|
||||
public static void setDefaultReconnectionPolicy(ReconnectionPolicy reconnectionPolicy) {
|
||||
defaultReconnectionPolicy = reconnectionPolicy;
|
||||
|
@ -173,7 +173,7 @@ public final class ReconnectionManager {
|
|||
/**
|
||||
* Set the Reconnection Policy to use.
|
||||
*
|
||||
* @param reconnectionPolicy
|
||||
* @param reconnectionPolicy TODO javadoc me please
|
||||
*/
|
||||
public void setReconnectionPolicy(ReconnectionPolicy reconnectionPolicy) {
|
||||
this.reconnectionPolicy = reconnectionPolicy;
|
||||
|
|
|
@ -183,13 +183,13 @@ public final class SASLAuthentication {
|
|||
* @param authzid the authorization identifier (typically null).
|
||||
* @param sslSession the optional SSL/TLS session (if one was established)
|
||||
* @return the used SASLMechanism.
|
||||
* @throws XMPPErrorException
|
||||
* @throws SASLErrorException
|
||||
* @throws IOException
|
||||
* @throws InterruptedException
|
||||
* @throws SmackSaslException
|
||||
* @throws NotConnectedException
|
||||
* @throws NoResponseException
|
||||
* @throws XMPPErrorException if there was an XMPP error returned.
|
||||
* @throws SASLErrorException if a SASL protocol error was returned.
|
||||
* @throws IOException if an I/O error occured.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
* @throws SmackSaslException if a SASL specific error occured.
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws NoResponseException if there was no response from the remote entity.
|
||||
*/
|
||||
public SASLMechanism authenticate(String username, String password, EntityBareJid authzid, SSLSession sslSession)
|
||||
throws XMPPErrorException, SASLErrorException, IOException,
|
||||
|
@ -239,8 +239,8 @@ public final class SASLAuthentication {
|
|||
* to <code>false</code>.
|
||||
*
|
||||
* @param challenge a base64 encoded string representing the challenge.
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
* @throws SmackException if Smack detected an exceptional situation.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
public void challengeReceived(String challenge) throws SmackException, InterruptedException {
|
||||
challengeReceived(challenge, false);
|
||||
|
@ -254,9 +254,9 @@ public final class SASLAuthentication {
|
|||
*
|
||||
* @param challenge a base64 encoded string representing the challenge.
|
||||
* @param finalChallenge true if this is the last challenge send by the server within the success stanza
|
||||
* @throws SmackSaslException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws SmackSaslException if a SASL specific error occured.
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
public void challengeReceived(String challenge, boolean finalChallenge) throws SmackSaslException, NotConnectedException, InterruptedException {
|
||||
try {
|
||||
|
@ -271,8 +271,8 @@ public final class SASLAuthentication {
|
|||
* Notification message saying that SASL authentication was successful. The next step
|
||||
* would be to bind the resource.
|
||||
* @param success result of the authentication.
|
||||
* @throws SmackException
|
||||
* @throws InterruptedException
|
||||
* @throws SmackException if Smack detected an exceptional situation.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
public void authenticated(Success success) throws SmackException, InterruptedException {
|
||||
// RFC6120 6.3.10 "At the end of the authentication exchange, the SASL server (the XMPP
|
||||
|
|
|
@ -241,7 +241,7 @@ public final class SmackConfiguration {
|
|||
/**
|
||||
* Set the default parsing exception callback for all newly created connections.
|
||||
*
|
||||
* @param callback
|
||||
* @param callback TODO javadoc me please
|
||||
* @see ParsingExceptionCallback
|
||||
*/
|
||||
public static void setDefaultParsingExceptionCallback(ParsingExceptionCallback callback) {
|
||||
|
@ -265,13 +265,20 @@ public final class SmackConfiguration {
|
|||
/**
|
||||
* Get compression handlers.
|
||||
*
|
||||
* @return a list of compression handlers.
|
||||
* @deprecated use {@link #getCompressionHandlers()} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
// TODO: Remove in Smack 4.4.
|
||||
public static List<XMPPInputOutputStream> getCompresionHandlers() {
|
||||
return getCompressionHandlers();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get compression handlers.
|
||||
*
|
||||
* @return a list of compression handlers.
|
||||
*/
|
||||
public static List<XMPPInputOutputStream> getCompressionHandlers() {
|
||||
List<XMPPInputOutputStream> res = new ArrayList<>(compressionHandlers.size());
|
||||
for (XMPPInputOutputStream ios : compressionHandlers) {
|
||||
|
@ -310,7 +317,7 @@ public final class SmackConfiguration {
|
|||
* package is disabled (but can be manually enabled).
|
||||
* </p>
|
||||
*
|
||||
* @param className
|
||||
* @param className TODO javadoc me please
|
||||
*/
|
||||
public static void addDisabledSmackClass(String className) {
|
||||
disabledSmackClasses.add(className);
|
||||
|
|
|
@ -292,7 +292,7 @@ public abstract class SmackFuture<V, E extends Exception> implements Future<V>,
|
|||
* A simple version of InternalSmackFuture which implements isNonFatalException(E) as always returning
|
||||
* <code>false</code> method.
|
||||
*
|
||||
* @param <V>
|
||||
* @param <V> the return value of the future.
|
||||
*/
|
||||
public abstract static class SimpleInternalProcessStanzaSmackFuture<V, E extends Exception>
|
||||
extends InternalProcessStanzaSmackFuture<V, E> {
|
||||
|
|
|
@ -148,7 +148,7 @@ public final class StanzaCollector implements AutoCloseable {
|
|||
*
|
||||
* @param <P> type of the result stanza.
|
||||
* @return the next available packet.
|
||||
* @throws InterruptedException
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// TODO: Consider removing this method as it is hardly ever useful.
|
||||
|
@ -173,7 +173,7 @@ public final class StanzaCollector implements AutoCloseable {
|
|||
*
|
||||
* @param <P> type of the result stanza.
|
||||
* @return the next available packet.
|
||||
* @throws InterruptedException
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
public <P extends Stanza> P nextResult() throws InterruptedException {
|
||||
return nextResult(connection.getReplyTimeout());
|
||||
|
@ -189,7 +189,7 @@ public final class StanzaCollector implements AutoCloseable {
|
|||
* @param <P> type of the result stanza.
|
||||
* @param timeout the timeout in milliseconds.
|
||||
* @return the next available stanza or <code>null</code> on timeout or connection error.
|
||||
* @throws InterruptedException
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public <P extends Stanza> P nextResult(long timeout) throws InterruptedException {
|
||||
|
@ -219,8 +219,8 @@ public final class StanzaCollector implements AutoCloseable {
|
|||
* @return the next available stanza.
|
||||
* @throws XMPPErrorException in case an error response was received.
|
||||
* @throws NoResponseException if there was no response from the server.
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @see #nextResultOrThrow(long)
|
||||
*/
|
||||
public <P extends Stanza> P nextResultOrThrow() throws NoResponseException, XMPPErrorException,
|
||||
|
@ -387,7 +387,7 @@ public final class StanzaCollector implements AutoCloseable {
|
|||
* Set the stanza filter used by this collector. If <code>null</code>, then all stanzas will
|
||||
* get collected by this collector.
|
||||
*
|
||||
* @param stanzaFilter
|
||||
* @param stanzaFilter TODO javadoc me please
|
||||
* @return a reference to this configuration.
|
||||
*/
|
||||
public Configuration setStanzaFilter(StanzaFilter stanzaFilter) {
|
||||
|
@ -399,7 +399,7 @@ public final class StanzaCollector implements AutoCloseable {
|
|||
* Set the maximum size of this collector, i.e. how many stanzas this collector will collect
|
||||
* before dropping old ones.
|
||||
*
|
||||
* @param size
|
||||
* @param size TODO javadoc me please
|
||||
* @return a reference to this configuration.
|
||||
*/
|
||||
public Configuration setSize(int size) {
|
||||
|
@ -411,7 +411,7 @@ public final class StanzaCollector implements AutoCloseable {
|
|||
* Set the collector which timeout for the next result is reset once this collector collects
|
||||
* a packet.
|
||||
*
|
||||
* @param collector
|
||||
* @param collector TODO javadoc me please
|
||||
* @return a reference to this configuration.
|
||||
*/
|
||||
public Configuration setCollectorToReset(StanzaCollector collector) {
|
||||
|
|
|
@ -48,9 +48,9 @@ public interface StanzaListener {
|
|||
* </p>
|
||||
*
|
||||
* @param packet the stanza to process.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotLoggedInException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
* @throws NotLoggedInException if the XMPP connection is not authenticated.
|
||||
*/
|
||||
void processStanza(Stanza packet) throws NotConnectedException, InterruptedException, NotLoggedInException;
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ public class SynchronizationPoint<E extends Exception> {
|
|||
/**
|
||||
* Check if this synchronization point is successful or wait the connections reply timeout.
|
||||
* @throws NoResponseException if there was no response marking the synchronization point as success or failed.
|
||||
* @throws InterruptedException
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
* @return <code>null</code> if synchronization point was successful, or the failure Exception.
|
||||
*/
|
||||
public Exception checkIfSuccessOrWait() throws NoResponseException, InterruptedException {
|
||||
|
@ -281,7 +281,7 @@ public class SynchronizationPoint<E extends Exception> {
|
|||
* {@link #reportSuccess()}, {@link #reportFailure()} and {@link #reportFailure(Exception)} will either set this
|
||||
* synchronization point to {@link State#Success} or {@link State#Failure}. If none of them is set after the
|
||||
* connections reply timeout, this method will set the state of {@link State#NoResponse}.
|
||||
* @throws InterruptedException
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
private void waitForConditionOrTimeout() throws InterruptedException {
|
||||
waitStart = System.currentTimeMillis();
|
||||
|
@ -324,7 +324,7 @@ public class SynchronizationPoint<E extends Exception> {
|
|||
* The exception is thrown, if state is one of 'Initial', 'NoResponse' or 'RequestSent'
|
||||
* </p>
|
||||
* @return <code>true</code> if synchronization point was successful, <code>false</code> on failure.
|
||||
* @throws NoResponseException
|
||||
* @throws NoResponseException if there was no response from the remote entity.
|
||||
*/
|
||||
private Exception checkForResponse() throws NoResponseException {
|
||||
switch (state) {
|
||||
|
|
|
@ -183,7 +183,7 @@ public interface XMPPConnection {
|
|||
*
|
||||
* @param stanza the stanza to send.
|
||||
* @throws NotConnectedException if the connection is not connected.
|
||||
* @throws InterruptedException
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
* */
|
||||
void sendStanza(Stanza stanza) throws NotConnectedException, InterruptedException;
|
||||
|
||||
|
@ -234,8 +234,8 @@ public interface XMPPConnection {
|
|||
* </p>
|
||||
*
|
||||
* @param nonza the Nonza to send.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
void sendNonza(Nonza nonza) throws NotConnectedException, InterruptedException;
|
||||
|
||||
|
@ -258,11 +258,12 @@ public interface XMPPConnection {
|
|||
* Send an IQ request and wait for the response.
|
||||
*
|
||||
* @param request the IQ request
|
||||
* @param <I> the type of the expected result IQ.
|
||||
* @return an IQ with type 'result'
|
||||
* @throws NoResponseException
|
||||
* @throws XMPPErrorException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NoResponseException if there was no response from the remote entity.
|
||||
* @throws XMPPErrorException if there was an XMPP error returned.
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
* @since 4.3
|
||||
*/
|
||||
<I extends IQ> I sendIqRequestAndWaitForResponse(IQ request)
|
||||
|
@ -276,8 +277,8 @@ public interface XMPPConnection {
|
|||
*
|
||||
* @param request the IQ request to filter responses from
|
||||
* @return a new stanza collector.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
StanzaCollector createStanzaCollectorAndSend(IQ request) throws NotConnectedException, InterruptedException;
|
||||
|
||||
|
@ -290,8 +291,8 @@ public interface XMPPConnection {
|
|||
* @param stanzaFilter the stanza filter to use.
|
||||
* @param stanza the stanza to send right after the collector got created
|
||||
* @return a new stanza collector.
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
*/
|
||||
StanzaCollector createStanzaCollectorAndSend(StanzaFilter stanzaFilter, Stanza stanza)
|
||||
throws NotConnectedException, InterruptedException;
|
||||
|
@ -498,7 +499,7 @@ public interface XMPPConnection {
|
|||
* Set the FromMode for this connection instance. Defines how the 'from' attribute of outgoing
|
||||
* stanzas should be populated by Smack.
|
||||
*
|
||||
* @param fromMode
|
||||
* @param fromMode TODO javadoc me please
|
||||
*/
|
||||
void setFromMode(FromMode fromMode);
|
||||
|
||||
|
@ -514,8 +515,8 @@ public interface XMPPConnection {
|
|||
* server, or <code>null</code> if the server doesn't support that feature.
|
||||
*
|
||||
* @param <F> {@link ExtensionElement} type of the feature.
|
||||
* @param element
|
||||
* @param namespace
|
||||
* @param element TODO javadoc me please
|
||||
* @param namespace TODO javadoc me please
|
||||
* @return a stanza extensions of the feature or <code>null</code>
|
||||
*/
|
||||
<F extends FullyQualifiedElement> F getFeature(String element, String namespace);
|
||||
|
@ -523,8 +524,8 @@ public interface XMPPConnection {
|
|||
/**
|
||||
* Return true if the server supports the given stream feature.
|
||||
*
|
||||
* @param element
|
||||
* @param namespace
|
||||
* @param element TODO javadoc me please
|
||||
* @param namespace TODO javadoc me please
|
||||
* @return true if the server supports the stream feature.
|
||||
*/
|
||||
boolean hasFeature(String element, String namespace);
|
||||
|
@ -552,6 +553,7 @@ public interface XMPPConnection {
|
|||
*
|
||||
* @param stanza the stanza to send.
|
||||
* @param replyFilter the filter used for the response stanza.
|
||||
* @param <S> the type of the stanza to send.
|
||||
* @return a SmackFuture for the response.
|
||||
*/
|
||||
<S extends Stanza> SmackFuture<S, Exception> sendAsync(S stanza, StanzaFilter replyFilter);
|
||||
|
@ -562,6 +564,7 @@ public interface XMPPConnection {
|
|||
* @param stanza the stanza to send.
|
||||
* @param replyFilter the filter used for the response stanza.
|
||||
* @param timeout the reply timeout in milliseconds.
|
||||
* @param <S> the type of the stanza to send.
|
||||
* @return a SmackFuture for the response.
|
||||
*/
|
||||
<S extends Stanza> SmackFuture<S, Exception> sendAsync(S stanza, StanzaFilter replyFilter, long timeout);
|
||||
|
@ -588,7 +591,7 @@ public interface XMPPConnection {
|
|||
/**
|
||||
* Convenience method for {@link #unregisterIQRequestHandler(String, String, org.jivesoftware.smack.packet.IQ.Type)}.
|
||||
*
|
||||
* @param iqRequestHandler
|
||||
* @param iqRequestHandler TODO javadoc me please
|
||||
* @return the previously registered IQ request handler or null.
|
||||
*/
|
||||
IQRequestHandler unregisterIQRequestHandler(IQRequestHandler iqRequestHandler);
|
||||
|
|
|
@ -86,17 +86,6 @@ public abstract class XMPPException extends Exception {
|
|||
*/
|
||||
private final Stanza request;
|
||||
|
||||
/**
|
||||
* Creates a new XMPPErrorException with the given builder.
|
||||
*
|
||||
* @param xmppErrorBuilder
|
||||
* @deprecated Use {@link #XMPPErrorException(Stanza, StanzaError)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public XMPPErrorException(StanzaError.Builder xmppErrorBuilder) {
|
||||
this(null, xmppErrorBuilder.build());
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new XMPPErrorException with the XMPPError that was the root case of the exception.
|
||||
*
|
||||
|
|
|
@ -76,7 +76,7 @@ public class Java7ZlibInputOutputStream extends XMPPInputOutputStream {
|
|||
* byte without blocking, 0 means that the system is known to block for more input.
|
||||
*
|
||||
* @return 0 if no data is available, 1 otherwise
|
||||
* @throws IOException
|
||||
* @throws IOException if an I/O error occured.
|
||||
*/
|
||||
@Override
|
||||
public int available() throws IOException {
|
||||
|
|
|
@ -30,7 +30,7 @@ public abstract class XMPPInputOutputStream {
|
|||
* Only use sync flush if you fully understand the implications.
|
||||
*
|
||||
* @see <a href="https://blog.thijsalkema.de/blog/2014/08/07/https-attacks-and-xmpp-2-crime-and-breach/">Attacks against XMPP when using compression</a>
|
||||
* @param flushMethod
|
||||
* @param flushMethod TODO javadoc me please
|
||||
*/
|
||||
public static void setFlushMethod(FlushMethod flushMethod) {
|
||||
XMPPInputOutputStream.flushMethod = flushMethod;
|
||||
|
|
|
@ -36,7 +36,7 @@ public abstract class AbstractFromToMatchesFilter implements StanzaFilter {
|
|||
*
|
||||
* @param address The address to filter for. If <code>null</code> is given, then
|
||||
* {@link #getAddressToCompare(Stanza)} must also return <code>null</code> to match.
|
||||
* @param ignoreResourcepart
|
||||
* @param ignoreResourcepart TODO javadoc me please
|
||||
*/
|
||||
protected AbstractFromToMatchesFilter(Jid address, boolean ignoreResourcepart) {
|
||||
if (address != null && ignoreResourcepart) {
|
||||
|
|
|
@ -39,7 +39,7 @@ public final class FromMatchesFilter extends AbstractFromToMatchesFilter {
|
|||
*
|
||||
* @param address The address to filter for. If <code>null</code> is given, the stanza must not
|
||||
* have a from address.
|
||||
* @param ignoreResourcepart
|
||||
* @param ignoreResourcepart TODO javadoc me please
|
||||
*/
|
||||
public FromMatchesFilter(Jid address, boolean ignoreResourcepart) {
|
||||
super(address, ignoreResourcepart);
|
||||
|
|
|
@ -61,7 +61,7 @@ public class PacketExtensionFilter implements StanzaFilter {
|
|||
/**
|
||||
* Creates a new stanza extension filter for the given stanza extension.
|
||||
*
|
||||
* @param packetExtension
|
||||
* @param packetExtension TODO javadoc me please
|
||||
*/
|
||||
public PacketExtensionFilter(ExtensionElement packetExtension) {
|
||||
this(packetExtension.getElementName(), packetExtension.getNamespace());
|
||||
|
|
|
@ -59,7 +59,7 @@ public class StanzaExtensionFilter implements StanzaFilter {
|
|||
/**
|
||||
* Creates a new stanza extension filter for the given stanza extension.
|
||||
*
|
||||
* @param packetExtension
|
||||
* @param packetExtension TODO javadoc me please
|
||||
*/
|
||||
public StanzaExtensionFilter(ExtensionElement packetExtension) {
|
||||
this(packetExtension.getElementName(), packetExtension.getNamespace());
|
||||
|
|
|
@ -431,6 +431,7 @@ public abstract class AbstractXmppStateMachineConnection extends AbstractXMPPCon
|
|||
/**
|
||||
* Check if the state should be activated.
|
||||
*
|
||||
* @param walkStateGraphContext the context of the current state graph walk.
|
||||
* @return <code>null</code> if the state should be activated.
|
||||
* @throws SmackException in case a Smack exception occurs.
|
||||
*/
|
||||
|
|
|
@ -252,14 +252,6 @@ public abstract class IQ extends Stanza {
|
|||
*/
|
||||
protected abstract IQChildElementXmlStringBuilder getIQChildElementBuilder(IQChildElementXmlStringBuilder xml);
|
||||
|
||||
/**
|
||||
* @deprecated use {@link #initializeAsResultFor(IQ)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
protected final void initialzeAsResultFor(IQ request) {
|
||||
initializeAsResultFor(request);
|
||||
}
|
||||
|
||||
protected final void initializeAsResultFor(IQ request) {
|
||||
assert this != request;
|
||||
|
||||
|
|
|
@ -46,7 +46,6 @@ import org.jxmpp.stringprep.XmppStringprepException;
|
|||
* </ul>
|
||||
*
|
||||
* For each message type, different message fields are typically used as follows:
|
||||
* <p>
|
||||
* <table border="1">
|
||||
* <caption>Message Types</caption>
|
||||
* <tr><td> </td><td colspan="5"><b>Message type</b></td></tr>
|
||||
|
@ -120,8 +119,8 @@ public final class Message extends Stanza implements TypedCloneable<Message> {
|
|||
/**
|
||||
* Creates a new message with the specified recipient and extension element.
|
||||
*
|
||||
* @param to
|
||||
* @param extensionElement
|
||||
* @param to TODO javadoc me please
|
||||
* @param extensionElement TODO javadoc me please
|
||||
* @since 4.2
|
||||
*/
|
||||
public Message(Jid to, ExtensionElement extensionElement) {
|
||||
|
@ -136,7 +135,7 @@ public final class Message extends Stanza implements TypedCloneable<Message> {
|
|||
* instance.
|
||||
* </p>
|
||||
*
|
||||
* @param other
|
||||
* @param other TODO javadoc me please
|
||||
*/
|
||||
public Message(Message other) {
|
||||
super(other);
|
||||
|
|
|
@ -56,7 +56,7 @@ public interface Packet extends TopLevelStreamElement {
|
|||
|
||||
/**
|
||||
* Set the stanza ID.
|
||||
* @param packetID
|
||||
* @param packetID TODO javadoc me please
|
||||
* @deprecated use {@link #setStanzaId(String)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
|
@ -195,8 +195,8 @@ public interface Packet extends TopLevelStreamElement {
|
|||
* The argument <code>elementName</code> may be null.
|
||||
* </p>
|
||||
*
|
||||
* @param elementName
|
||||
* @param namespace
|
||||
* @param elementName TODO javadoc me please
|
||||
* @param namespace TODO javadoc me please
|
||||
* @return true if a stanza extension exists, false otherwise.
|
||||
*/
|
||||
boolean hasExtension(String elementName, String namespace);
|
||||
|
@ -204,7 +204,7 @@ public interface Packet extends TopLevelStreamElement {
|
|||
/**
|
||||
* Check if a stanza extension with the given namespace exists.
|
||||
*
|
||||
* @param namespace
|
||||
* @param namespace TODO javadoc me please
|
||||
* @return true if a stanza extension exists, false otherwise.
|
||||
*/
|
||||
boolean hasExtension(String namespace);
|
||||
|
@ -212,8 +212,8 @@ public interface Packet extends TopLevelStreamElement {
|
|||
/**
|
||||
* Remove the stanza extension with the given elementName and namespace.
|
||||
*
|
||||
* @param elementName
|
||||
* @param namespace
|
||||
* @param elementName TODO javadoc me please
|
||||
* @param namespace TODO javadoc me please
|
||||
* @return the removed stanza extension or null.
|
||||
*/
|
||||
ExtensionElement removeExtension(String elementName, String namespace);
|
||||
|
|
|
@ -124,7 +124,7 @@ public final class Presence extends Stanza implements TypedCloneable<Presence> {
|
|||
* instance.
|
||||
* </p>
|
||||
*
|
||||
* @param other
|
||||
* @param other TODO javadoc me please
|
||||
*/
|
||||
public Presence(Presence other) {
|
||||
super(other);
|
||||
|
|
|
@ -130,7 +130,7 @@ public abstract class Stanza implements TopLevelStreamElement {
|
|||
|
||||
/**
|
||||
* Set the stanza ID.
|
||||
* @param packetID
|
||||
* @param packetID TODO javadoc me please
|
||||
* @deprecated use {@link #setStanzaId(String)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
|
@ -422,8 +422,8 @@ public abstract class Stanza implements TopLevelStreamElement {
|
|||
* The argument <code>elementName</code> may be null.
|
||||
* </p>
|
||||
*
|
||||
* @param elementName
|
||||
* @param namespace
|
||||
* @param elementName TODO javadoc me please
|
||||
* @param namespace TODO javadoc me please
|
||||
* @return true if a stanza extension exists, false otherwise.
|
||||
*/
|
||||
public boolean hasExtension(String elementName, String namespace) {
|
||||
|
@ -439,7 +439,7 @@ public abstract class Stanza implements TopLevelStreamElement {
|
|||
/**
|
||||
* Check if a stanza extension with the given namespace exists.
|
||||
*
|
||||
* @param namespace
|
||||
* @param namespace TODO javadoc me please
|
||||
* @return true if a stanza extension exists, false otherwise.
|
||||
*/
|
||||
public boolean hasExtension(String namespace) {
|
||||
|
@ -456,8 +456,8 @@ public abstract class Stanza implements TopLevelStreamElement {
|
|||
/**
|
||||
* Remove the stanza extension with the given elementName and namespace.
|
||||
*
|
||||
* @param elementName
|
||||
* @param namespace
|
||||
* @param elementName TODO javadoc me please
|
||||
* @param namespace TODO javadoc me please
|
||||
* @return the removed stanza extension or null.
|
||||
*/
|
||||
public ExtensionElement removeExtension(String elementName, String namespace) {
|
||||
|
@ -546,6 +546,7 @@ public abstract class Stanza implements TopLevelStreamElement {
|
|||
* Append an XMPPError is this stanza has one set.
|
||||
*
|
||||
* @param xml the XmlStringBuilder to append the error to.
|
||||
* @param enclosingXmlEnvironment the enclosing XML environment.
|
||||
*/
|
||||
protected void appendErrorIfExists(XmlStringBuilder xml, XmlEnvironment enclosingXmlEnvironment) {
|
||||
StanzaError error = getError();
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.jivesoftware.smack.util.XmlStringBuilder;
|
|||
/**
|
||||
* Represents an XMPP error sub-packet. Typically, a server responds to a request that has
|
||||
* problems by sending the stanza back and including an error packet. Each error has a type,
|
||||
* error condition as well as as an optional text explanation. Typical errors are:<p>
|
||||
* error condition as well as as an optional text explanation. Typical errors are:
|
||||
*
|
||||
* <table border=1>
|
||||
* <caption>XMPP Errors</caption>
|
||||
|
@ -116,9 +116,9 @@ public class StanzaError extends AbstractError implements ExtensionElement {
|
|||
*
|
||||
* @param type the error type.
|
||||
* @param condition the error condition.
|
||||
* @param conditionText
|
||||
* @param errorGenerator
|
||||
* @param descriptiveTexts
|
||||
* @param conditionText TODO javadoc me please
|
||||
* @param errorGenerator TODO javadoc me please
|
||||
* @param descriptiveTexts TODO javadoc me please
|
||||
* @param extensions list of stanza extensions
|
||||
* @param stanza the stanza carrying this XMPP error.
|
||||
*/
|
||||
|
|
|
@ -26,7 +26,7 @@ import org.jivesoftware.smack.util.XmlStringBuilder;
|
|||
/**
|
||||
* Represents a stream error packet. Stream errors are unrecoverable errors where the server
|
||||
* will close the underlying TCP connection after the stream error was sent to the client.
|
||||
* These is the list of stream errors as defined in the XMPP spec:<p>
|
||||
* These is the list of stream errors as defined in the XMPP spec:
|
||||
*
|
||||
* <table border=1>
|
||||
* <caption>Stream Errors</caption>
|
||||
|
|
|
@ -39,7 +39,7 @@ public interface ParsingExceptionCallback {
|
|||
* Called when parsing a stanza caused an exception.
|
||||
*
|
||||
* @param stanzaData the raw stanza data that caused the exception
|
||||
* @throws IOException
|
||||
* @throws IOException if an I/O error occured.
|
||||
*/
|
||||
void handleUnparsableStanza(UnparseableStanza stanzaData) throws IOException;
|
||||
|
||||
|
|
|
@ -140,8 +140,8 @@ public abstract class SASLMechanism implements Comparable<SASLMechanism> {
|
|||
* @param authzid the optional authorization identity.
|
||||
* @param sslSession the optional SSL/TLS session (if one was established)
|
||||
* @throws SmackSaslException if a SASL related error occurs.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
public final void authenticate(String username, String host, DomainBareJid serviceName, String password,
|
||||
EntityBareJid authzid, SSLSession sslSession)
|
||||
|
@ -170,8 +170,8 @@ public abstract class SASLMechanism implements Comparable<SASLMechanism> {
|
|||
* @param authzid the optional authorization identity.
|
||||
* @param sslSession the optional SSL/TLS session (if one was established)
|
||||
* @throws SmackSaslException if a SASL related error occurs.
|
||||
* @throws NotConnectedException
|
||||
* @throws InterruptedException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
* @throws InterruptedException if the calling thread was interrupted.
|
||||
*/
|
||||
public void authenticate(String host, DomainBareJid serviceName, CallbackHandler cbh, EntityBareJid authzid, SSLSession sslSession)
|
||||
throws SmackSaslException, NotConnectedException, InterruptedException {
|
||||
|
@ -210,7 +210,7 @@ public abstract class SASLMechanism implements Comparable<SASLMechanism> {
|
|||
* empty array here.
|
||||
*
|
||||
* @return the initial response or null
|
||||
* @throws SmackSaslException
|
||||
* @throws SmackSaslException if a SASL specific error occured.
|
||||
*/
|
||||
protected abstract byte[] getAuthenticationText() throws SmackSaslException;
|
||||
|
||||
|
@ -222,7 +222,7 @@ public abstract class SASLMechanism implements Comparable<SASLMechanism> {
|
|||
* @param finalChallenge true if this is the last challenge send by the server within the success stanza
|
||||
* @throws SmackSaslException if a SASL related error occurs.
|
||||
* @throws InterruptedException if the connection is interrupted
|
||||
* @throws NotConnectedException
|
||||
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||
*/
|
||||
public final void challengeReceived(String challengeString, boolean finalChallenge) throws SmackSaslException, InterruptedException, NotConnectedException {
|
||||
byte[] challenge = Base64.decode((challengeString != null && challengeString.equals("=")) ? "" : challengeString);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright 2016 Florian Schmaus
|
||||
* Copyright 2016-2019 Florian Schmaus
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -25,10 +25,10 @@ public interface ScramHmac {
|
|||
/**
|
||||
* RFC 5802 § 2.2 HMAC(key, str).
|
||||
*
|
||||
* @param key
|
||||
* @param str
|
||||
* @param key TODO javadoc me please
|
||||
* @param str TODO javadoc me please
|
||||
* @return the HMAC-SHA1 value of the input.
|
||||
* @throws InvalidKeyException
|
||||
* @throws InvalidKeyException in case there was an invalid key.
|
||||
*/
|
||||
byte[] hmac(byte[] key, byte[] str) throws InvalidKeyException;
|
||||
|
||||
|
|
|
@ -259,7 +259,7 @@ public abstract class ScramMechanism extends SASLMechanism {
|
|||
/**
|
||||
*
|
||||
* @return the Channel Binding data.
|
||||
* @throws SmackSaslException
|
||||
* @throws SmackSaslException if a SASL specific error occured.
|
||||
*/
|
||||
protected byte[] getChannelBindingData() throws SmackSaslException {
|
||||
return null;
|
||||
|
@ -327,7 +327,7 @@ public abstract class ScramMechanism extends SASLMechanism {
|
|||
* "The characters ',' or '=' in usernames are sent as '=2C' and '=3D' respectively."
|
||||
* </p>
|
||||
*
|
||||
* @param string
|
||||
* @param string TODO javadoc me please
|
||||
* @return the escaped string
|
||||
*/
|
||||
private static String escape(String string) {
|
||||
|
@ -352,10 +352,10 @@ public abstract class ScramMechanism extends SASLMechanism {
|
|||
/**
|
||||
* RFC 5802 § 2.2 HMAC(key, str)
|
||||
*
|
||||
* @param key
|
||||
* @param str
|
||||
* @param key TODO javadoc me please
|
||||
* @param str TODO javadoc me please
|
||||
* @return the HMAC-SHA1 value of the input.
|
||||
* @throws SmackException
|
||||
* @throws SmackException if Smack detected an exceptional situation.
|
||||
*/
|
||||
private byte[] hmac(byte[] key, byte[] str) throws SmackSaslException {
|
||||
try {
|
||||
|
@ -374,8 +374,8 @@ public abstract class ScramMechanism extends SASLMechanism {
|
|||
* </p>
|
||||
*
|
||||
* @param normalizedPassword the normalized password.
|
||||
* @param salt
|
||||
* @param iterations
|
||||
* @param salt TODO javadoc me please
|
||||
* @param iterations TODO javadoc me please
|
||||
* @return the result of the Hi function.
|
||||
* @throws SmackSaslException if a SASL related error occurs.
|
||||
*/
|
||||
|
|
|
@ -24,7 +24,7 @@ public class Async {
|
|||
/**
|
||||
* Creates a new thread with the given Runnable, marks it daemon, starts it and returns the started thread.
|
||||
*
|
||||
* @param runnable
|
||||
* @param runnable TODO javadoc me please
|
||||
* @return the started thread.
|
||||
*/
|
||||
public static Thread go(Runnable runnable) {
|
||||
|
@ -37,7 +37,7 @@ public class Async {
|
|||
* Creates a new thread with the given Runnable, marks it daemon, sets the name, starts it and returns the started
|
||||
* thread.
|
||||
*
|
||||
* @param runnable
|
||||
* @param runnable TODO javadoc me please
|
||||
* @param threadName the thread name.
|
||||
* @return the started thread.
|
||||
*/
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright © 2014 Florian Schmaus
|
||||
* Copyright © 2014-2019 Florian Schmaus
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -21,13 +21,11 @@ public class ByteUtils {
|
|||
/**
|
||||
* Concatenate two byte arrays.
|
||||
*
|
||||
* @deprecated use {@link #concat(byte[], byte[])} instead.
|
||||
* @param arrayOne the first input array.
|
||||
* @param arrayTwo the second input array
|
||||
* @return the concatenation of the first and second input array.
|
||||
*
|
||||
*/
|
||||
@Deprecated
|
||||
public static byte[] concact(byte[] arrayOne, byte[] arrayTwo) {
|
||||
return concat(arrayOne, arrayTwo);
|
||||
}
|
||||
|
||||
public static byte[] concat(byte[] arrayOne, byte[] arrayTwo) {
|
||||
int combinedLength = arrayOne.length + arrayTwo.length;
|
||||
byte[] res = new byte[combinedLength];
|
||||
|
@ -35,4 +33,5 @@ public class ByteUtils {
|
|||
System.arraycopy(arrayTwo, 0, res, arrayOne.length, arrayTwo.length);
|
||||
return res;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ public class DNSUtil {
|
|||
/**
|
||||
* Set the DNS resolver that should be used to perform DNS lookups.
|
||||
*
|
||||
* @param resolver
|
||||
* @param resolver TODO javadoc me please
|
||||
*/
|
||||
public static void setDNSResolver(DNSResolver resolver) {
|
||||
dnsResolver = Objects.requireNonNull(resolver);
|
||||
|
@ -69,7 +69,7 @@ public class DNSUtil {
|
|||
/**
|
||||
* Set the DANE provider that should be used when DANE is enabled.
|
||||
*
|
||||
* @param daneProvider
|
||||
* @param daneProvider TODO javadoc me please
|
||||
*/
|
||||
public static void setDaneProvider(SmackDaneProvider daneProvider) {
|
||||
DNSUtil.daneProvider = Objects.requireNonNull(daneProvider);
|
||||
|
@ -189,7 +189,7 @@ public class DNSUtil {
|
|||
* Note that we follow the RFC with one exception. In a group of the same priority, only the first entry
|
||||
* is calculated by random. The others are ore simply ordered by their priority.
|
||||
*
|
||||
* @param records
|
||||
* @param records TODO javadoc me please
|
||||
* @return the list of resolved HostAddresses
|
||||
*/
|
||||
private static List<HostAddress> sortSRVRecords(List<SRVRecord> records) {
|
||||
|
|
|
@ -47,7 +47,7 @@ public class EventManger<K, R, E extends Exception> {
|
|||
* @param action the action to perform prior waiting for the event, must not be null.
|
||||
* @return the event value, may be null.
|
||||
* @throws InterruptedException if interrupted while waiting for the event.
|
||||
* @throws E
|
||||
* @throws E depending on the concrete use case.
|
||||
*/
|
||||
public R performActionAndWaitForEvent(K eventKey, long timeout, Callback<E> action) throws InterruptedException, E {
|
||||
final Reference<R> reference = new Reference<>();
|
||||
|
|
|
@ -108,9 +108,9 @@ public final class FileUtils {
|
|||
/**
|
||||
* Reads the contents of a File.
|
||||
*
|
||||
* @param file
|
||||
* @param file TODO javadoc me please
|
||||
* @return the content of file or null in case of an error
|
||||
* @throws IOException
|
||||
* @throws IOException if an I/O error occured.
|
||||
*/
|
||||
@SuppressWarnings("DefaultCharset")
|
||||
public static String readFileOrThrow(File file) throws IOException {
|
||||
|
|
|
@ -93,7 +93,7 @@ public class MultiMap<K, V> {
|
|||
/**
|
||||
* Get the first value for the given key, or <code>null</code> if there are no entries.
|
||||
*
|
||||
* @param key
|
||||
* @param key TODO javadoc me please
|
||||
* @return the first value or null.
|
||||
*/
|
||||
public V getFirst(K key) {
|
||||
|
@ -111,7 +111,7 @@ public class MultiMap<K, V> {
|
|||
* Changes to the returned set will update the underlying MultiMap if the return set is not empty.
|
||||
* </p>
|
||||
*
|
||||
* @param key
|
||||
* @param key TODO javadoc me please
|
||||
* @return all values for the given key.
|
||||
*/
|
||||
public List<V> getAll(K key) {
|
||||
|
@ -140,7 +140,7 @@ public class MultiMap<K, V> {
|
|||
/**
|
||||
* Removes all mappings for the given key and returns the first value if there where mappings or <code>null</code> if not.
|
||||
*
|
||||
* @param key
|
||||
* @param key TODO javadoc me please
|
||||
* @return the first value of the given key or null.
|
||||
*/
|
||||
public V remove(K key) {
|
||||
|
@ -158,8 +158,8 @@ public class MultiMap<K, V> {
|
|||
* Returns <code>true</code> if the mapping was removed and <code>false</code> if the mapping did not exist.
|
||||
* </p>
|
||||
*
|
||||
* @param key
|
||||
* @param value
|
||||
* @param key TODO javadoc me please
|
||||
* @param value TODO javadoc me please
|
||||
* @return true if the mapping was removed, false otherwise.
|
||||
*/
|
||||
public boolean removeOne(K key, V value) {
|
||||
|
|
|
@ -21,7 +21,7 @@ public class NumberUtil {
|
|||
/**
|
||||
* Checks if the given long is within the range of an unsigned 32-bit integer, the XML type "xs:unsignedInt".
|
||||
*
|
||||
* @param value
|
||||
* @param value TODO javadoc me please
|
||||
* @deprecated use {@link #requireUInt32(long)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
|
@ -33,7 +33,8 @@ public class NumberUtil {
|
|||
/**
|
||||
* Checks if the given long is within the range of an unsigned 32-bit integer, the XML type "xs:unsignedInt".
|
||||
*
|
||||
* @param value
|
||||
* @param value TODO javadoc me please
|
||||
* @return the input value.
|
||||
*/
|
||||
public static long requireUInt32(long value) {
|
||||
if (value < 0) {
|
||||
|
@ -48,7 +49,8 @@ public class NumberUtil {
|
|||
/**
|
||||
* Checks if the given int is within the range of an unsigned 16-bit integer, the XML type "xs:unsignedShort".
|
||||
*
|
||||
* @param value
|
||||
* @param value TODO javadoc me please
|
||||
* @return the input value.
|
||||
*/
|
||||
public static int requireUShort16(int value) {
|
||||
if (value < 0) {
|
||||
|
|
|
@ -54,7 +54,7 @@ public class Objects {
|
|||
* @param collection collection
|
||||
* @param message error message
|
||||
* @param <T> Collection type
|
||||
* @return collection
|
||||
* @return collection TODO javadoc me please
|
||||
*/
|
||||
public static <T extends Collection<?>> T requireNonNullNorEmpty(T collection, String message) {
|
||||
if (requireNonNull(collection).isEmpty()) {
|
||||
|
|
|
@ -99,12 +99,12 @@ public class PacketParserUtils {
|
|||
*
|
||||
* connection is optional and is used to return feature-not-implemented errors for unknown IQ stanzas.
|
||||
*
|
||||
* @param parser
|
||||
* @param parser TODO javadoc me please
|
||||
* @param outerXmlEnvironment the outer XML environment (optional).
|
||||
* @return a stanza which is either a Message, IQ or Presence.
|
||||
* @throws XmlPullParserException
|
||||
* @throws SmackParsingException
|
||||
* @throws IOException
|
||||
* @throws XmlPullParserException if an error in the XML parser occured.
|
||||
* @throws SmackParsingException if the Smack parser (provider) encountered invalid input.
|
||||
* @throws IOException if an I/O error occured.
|
||||
*/
|
||||
public static Stanza parseStanza(XmlPullParser parser, XmlEnvironment outerXmlEnvironment) throws XmlPullParserException, SmackParsingException, IOException {
|
||||
ParserUtils.assertAtStartTag(parser);
|
||||
|
@ -131,9 +131,9 @@ public class PacketParserUtils {
|
|||
* @param parser the XML parser, positioned at the start of a message packet.
|
||||
* @param outerXmlEnvironment the outer XML environment (optional).
|
||||
* @return a Message packet.
|
||||
* @throws XmlPullParserException
|
||||
* @throws IOException
|
||||
* @throws SmackParsingException
|
||||
* @throws XmlPullParserException if an error in the XML parser occured.
|
||||
* @throws IOException if an I/O error occured.
|
||||
* @throws SmackParsingException if the Smack parser (provider) encountered invalid input.
|
||||
*/
|
||||
public static Message parseMessage(XmlPullParser parser, XmlEnvironment outerXmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException {
|
||||
ParserUtils.assertAtStartTag(parser);
|
||||
|
@ -212,10 +212,10 @@ public class PacketParserUtils {
|
|||
* This method is used for the parts where the XMPP specification requires elements that contain
|
||||
* only text or are the empty element.
|
||||
*
|
||||
* @param parser
|
||||
* @param parser TODO javadoc me please
|
||||
* @return the textual content of the element as String
|
||||
* @throws XmlPullParserException
|
||||
* @throws IOException
|
||||
* @throws XmlPullParserException if an error in the XML parser occured.
|
||||
* @throws IOException if an I/O error occured.
|
||||
*/
|
||||
public static String parseElementText(XmlPullParser parser) throws XmlPullParserException, IOException {
|
||||
assert parser.getEventType() == XmlPullParser.Event.START_ELEMENT;
|
||||
|
@ -253,8 +253,8 @@ public class PacketParserUtils {
|
|||
*
|
||||
* @param parser the XML pull parser
|
||||
* @return the element as string
|
||||
* @throws XmlPullParserException
|
||||
* @throws IOException
|
||||
* @throws XmlPullParserException if an error in the XML parser occured.
|
||||
* @throws IOException if an I/O error occured.
|
||||
*/
|
||||
public static CharSequence parseElement(XmlPullParser parser) throws XmlPullParserException, IOException {
|
||||
return parseElement(parser, false);
|
||||
|
@ -288,12 +288,12 @@ public class PacketParserUtils {
|
|||
* In particular Android's XmlPullParser does not support XML_ROUNDTRIP.
|
||||
* </p>
|
||||
*
|
||||
* @param parser
|
||||
* @param depth
|
||||
* @param fullNamespaces
|
||||
* @param parser TODO javadoc me please
|
||||
* @param depth TODO javadoc me please
|
||||
* @param fullNamespaces TODO javadoc me please
|
||||
* @return the content of the current depth
|
||||
* @throws XmlPullParserException
|
||||
* @throws IOException
|
||||
* @throws XmlPullParserException if an error in the XML parser occured.
|
||||
* @throws IOException if an I/O error occured.
|
||||
*/
|
||||
public static CharSequence parseContentDepth(XmlPullParser parser, int depth, boolean fullNamespaces) throws XmlPullParserException, IOException {
|
||||
if (parser.supportsRoundtrip()) {
|
||||
|
@ -418,9 +418,9 @@ public class PacketParserUtils {
|
|||
* @param parser the XML parser, positioned at the start of a presence packet.
|
||||
* @param outerXmlEnvironment the outer XML environment (optional).
|
||||
* @return a Presence packet.
|
||||
* @throws IOException
|
||||
* @throws XmlPullParserException
|
||||
* @throws SmackParsingException
|
||||
* @throws IOException if an I/O error occured.
|
||||
* @throws XmlPullParserException if an error in the XML parser occured.
|
||||
* @throws SmackParsingException if the Smack parser (provider) encountered invalid input.
|
||||
*/
|
||||
public static Presence parsePresence(XmlPullParser parser, XmlEnvironment outerXmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException {
|
||||
ParserUtils.assertAtStartTag(parser);
|
||||
|
@ -511,10 +511,10 @@ public class PacketParserUtils {
|
|||
* @param parser the XML parser, positioned at the start of an IQ packet.
|
||||
* @param outerXmlEnvironment the outer XML environment (optional).
|
||||
* @return an IQ object.
|
||||
* @throws XmlPullParserException
|
||||
* @throws XmppStringprepException
|
||||
* @throws IOException
|
||||
* @throws SmackParsingException
|
||||
* @throws XmlPullParserException if an error in the XML parser occured.
|
||||
* @throws XmppStringprepException if the provided string is invalid.
|
||||
* @throws IOException if an I/O error occured.
|
||||
* @throws SmackParsingException if the Smack parser (provider) encountered invalid input.
|
||||
*/
|
||||
public static IQ parseIQ(XmlPullParser parser, XmlEnvironment outerXmlEnvironment) throws XmlPullParserException, XmppStringprepException, IOException, SmackParsingException {
|
||||
ParserUtils.assertAtStartTag(parser);
|
||||
|
@ -596,8 +596,8 @@ public class PacketParserUtils {
|
|||
*
|
||||
* @param parser the XML parser, positioned at the start of the mechanisms stanza.
|
||||
* @return a collection of Stings with the mechanisms included in the mechanisms stanza.
|
||||
* @throws IOException
|
||||
* @throws XmlPullParserException
|
||||
* @throws IOException if an I/O error occured.
|
||||
* @throws XmlPullParserException if an error in the XML parser occured.
|
||||
*/
|
||||
public static Collection<String> parseMechanisms(XmlPullParser parser)
|
||||
throws XmlPullParserException, IOException {
|
||||
|
@ -626,7 +626,7 @@ public class PacketParserUtils {
|
|||
*
|
||||
* @param parser the XML parser, positioned at the start of the compression stanza.
|
||||
* @return The CompressionFeature stream element
|
||||
* @throws IOException
|
||||
* @throws IOException if an I/O error occured.
|
||||
* @throws XmlPullParserException if an exception occurs while parsing the stanza.
|
||||
*/
|
||||
public static Compress.Feature parseCompressionFeature(XmlPullParser parser)
|
||||
|
@ -688,8 +688,8 @@ public class PacketParserUtils {
|
|||
*
|
||||
* @param parser the XML parser.
|
||||
* @return a SASL Failure packet.
|
||||
* @throws IOException
|
||||
* @throws XmlPullParserException
|
||||
* @throws IOException if an I/O error occured.
|
||||
* @throws XmlPullParserException if an error in the XML parser occured.
|
||||
*/
|
||||
public static SASLFailure parseSASLFailure(XmlPullParser parser) throws XmlPullParserException, IOException {
|
||||
final int initialDepth = parser.getDepth();
|
||||
|
@ -731,9 +731,9 @@ public class PacketParserUtils {
|
|||
* @param parser the XML parser.
|
||||
* @param outerXmlEnvironment the outer XML environment (optional).
|
||||
* @return an stream error packet.
|
||||
* @throws IOException
|
||||
* @throws XmlPullParserException
|
||||
* @throws SmackParsingException
|
||||
* @throws IOException if an I/O error occured.
|
||||
* @throws XmlPullParserException if an error in the XML parser occured.
|
||||
* @throws SmackParsingException if the Smack parser (provider) encountered invalid input.
|
||||
*/
|
||||
public static StreamError parseStreamError(XmlPullParser parser, XmlEnvironment outerXmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException {
|
||||
final int initialDepth = parser.getDepth();
|
||||
|
@ -793,9 +793,9 @@ public class PacketParserUtils {
|
|||
* @param parser the XML parser.
|
||||
* @param outerXmlEnvironment the outer XML environment (optional).
|
||||
* @return an error sub-packet.
|
||||
* @throws IOException
|
||||
* @throws XmlPullParserException
|
||||
* @throws SmackParsingException
|
||||
* @throws IOException if an I/O error occured.
|
||||
* @throws XmlPullParserException if an error in the XML parser occured.
|
||||
* @throws SmackParsingException if the Smack parser (provider) encountered invalid input.
|
||||
*/
|
||||
public static StanzaError.Builder parseError(XmlPullParser parser, XmlEnvironment outerXmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException {
|
||||
final int initialDepth = parser.getDepth();
|
||||
|
@ -856,9 +856,9 @@ public class PacketParserUtils {
|
|||
* @param outerXmlEnvironment the outer XML environment (optional).
|
||||
*
|
||||
* @return an extension element.
|
||||
* @throws XmlPullParserException
|
||||
* @throws IOException
|
||||
* @throws SmackParsingException
|
||||
* @throws XmlPullParserException if an error in the XML parser occured.
|
||||
* @throws IOException if an I/O error occured.
|
||||
* @throws SmackParsingException if the Smack parser (provider) encountered invalid input.
|
||||
*/
|
||||
public static ExtensionElement parseExtensionElement(String elementName, String namespace,
|
||||
XmlPullParser parser, XmlEnvironment outerXmlEnvironment) throws XmlPullParserException, IOException, SmackParsingException {
|
||||
|
|
|
@ -24,10 +24,10 @@ public class PacketUtil {
|
|||
|
||||
/**
|
||||
* Get a extension element from a collection.
|
||||
* @param collection
|
||||
* @param element
|
||||
* @param namespace
|
||||
* @param <PE>
|
||||
* @param collection TODO javadoc me please
|
||||
* @param element TODO javadoc me please
|
||||
* @param namespace TODO javadoc me please
|
||||
* @param <PE> the type of the extension element.
|
||||
* @return the extension element
|
||||
* @deprecated use {@link #extensionElementFrom(Collection, String, String)} instead.
|
||||
*/
|
||||
|
|
|
@ -156,8 +156,8 @@ public class ParserUtils {
|
|||
/**
|
||||
* Get the boolean value of an argument.
|
||||
*
|
||||
* @param parser
|
||||
* @param name
|
||||
* @param parser TODO javadoc me please
|
||||
* @param name TODO javadoc me please
|
||||
* @return the boolean value or null of no argument of the given name exists
|
||||
*/
|
||||
public static Boolean getBooleanAttribute(XmlPullParser parser, String name) {
|
||||
|
|
|
@ -390,7 +390,7 @@ public class StringUtils {
|
|||
/**
|
||||
* Returns true if the given CharSequence is null or empty.
|
||||
*
|
||||
* @param cs
|
||||
* @param cs TODO javadoc me please
|
||||
* @return true if the given CharSequence is null or empty
|
||||
*/
|
||||
public static boolean isNullOrEmpty(CharSequence cs) {
|
||||
|
@ -430,7 +430,7 @@ public class StringUtils {
|
|||
/**
|
||||
* Returns true if the given CharSequence is empty.
|
||||
*
|
||||
* @param cs
|
||||
* @param cs TODO javadoc me please
|
||||
* @return true if the given CharSequence is empty
|
||||
*/
|
||||
public static boolean isEmpty(CharSequence cs) {
|
||||
|
@ -498,7 +498,7 @@ public class StringUtils {
|
|||
* @param cs CharSequence
|
||||
* @param message error message
|
||||
* @param <CS> CharSequence type
|
||||
* @return cs
|
||||
* @return cs TODO javadoc me please
|
||||
*/
|
||||
@Deprecated
|
||||
public static <CS extends CharSequence> CS requireNotNullOrEmpty(CS cs, String message) {
|
||||
|
@ -511,7 +511,7 @@ public class StringUtils {
|
|||
* @param cs CharSequence
|
||||
* @param message error message
|
||||
* @param <CS> CharSequence type
|
||||
* @return cs
|
||||
* @return cs TODO javadoc me please
|
||||
*/
|
||||
public static <CS extends CharSequence> CS requireNotNullNorEmpty(CS cs, String message) {
|
||||
if (isNullOrEmpty(cs)) {
|
||||
|
|
|
@ -99,8 +99,8 @@ public class TLSUtils {
|
|||
*
|
||||
* @param builder a connection configuration builder.
|
||||
* @param <B> Type of the ConnectionConfiguration builder.
|
||||
* @throws NoSuchAlgorithmException
|
||||
* @throws KeyManagementException
|
||||
* @throws NoSuchAlgorithmException if no such algorithm is available.
|
||||
* @throws KeyManagementException if there was a key mangement error.
|
||||
* @return the given builder.
|
||||
*/
|
||||
public static <B extends ConnectionConfiguration.Builder<B, ?>> B acceptAllCertificates(B builder) throws NoSuchAlgorithmException, KeyManagementException {
|
||||
|
@ -184,9 +184,9 @@ public class TLSUtils {
|
|||
*
|
||||
* @param sslSession the SSL/TLS session from which the data should be retrieved.
|
||||
* @return the channel binding data.
|
||||
* @throws SSLPeerUnverifiedException
|
||||
* @throws CertificateEncodingException
|
||||
* @throws NoSuchAlgorithmException
|
||||
* @throws SSLPeerUnverifiedException if we TLS peer could not be verified.
|
||||
* @throws CertificateEncodingException if there was an encoding error with the certificate.
|
||||
* @throws NoSuchAlgorithmException if no such algorithm is available.
|
||||
* @see <a href="https://tools.ietf.org/html/rfc5929#section-4">RFC 5929 § 4.</a>
|
||||
*/
|
||||
public static byte[] getChannelBindingTlsServerEndPoint(final SSLSession sslSession)
|
||||
|
|
|
@ -72,8 +72,8 @@ public class XmlStringBuilder implements Appendable, CharSequence, Element {
|
|||
/**
|
||||
* Add a new element to this builder.
|
||||
*
|
||||
* @param name
|
||||
* @param content
|
||||
* @param name TODO javadoc me please
|
||||
* @param content TODO javadoc me please
|
||||
* @return the XmlStringBuilder
|
||||
*/
|
||||
public XmlStringBuilder element(String name, String content) {
|
||||
|
@ -102,8 +102,8 @@ public class XmlStringBuilder implements Appendable, CharSequence, Element {
|
|||
/**
|
||||
* Add a new element to this builder.
|
||||
*
|
||||
* @param name
|
||||
* @param content
|
||||
* @param name TODO javadoc me please
|
||||
* @param content TODO javadoc me please
|
||||
* @return the XmlStringBuilder
|
||||
*/
|
||||
public XmlStringBuilder element(String name, CharSequence content) {
|
||||
|
@ -234,8 +234,8 @@ public class XmlStringBuilder implements Appendable, CharSequence, Element {
|
|||
/**
|
||||
* Does nothing if value is null.
|
||||
*
|
||||
* @param name
|
||||
* @param value
|
||||
* @param name TODO javadoc me please
|
||||
* @param value TODO javadoc me please
|
||||
* @return the XmlStringBuilder
|
||||
*/
|
||||
public XmlStringBuilder attribute(String name, String value) {
|
||||
|
@ -347,8 +347,8 @@ public class XmlStringBuilder implements Appendable, CharSequence, Element {
|
|||
/**
|
||||
* Add the given attribute if {@code value => 0}.
|
||||
*
|
||||
* @param name
|
||||
* @param value
|
||||
* @param name TODO javadoc me please
|
||||
* @param value TODO javadoc me please
|
||||
* @return a reference to this object
|
||||
*/
|
||||
public XmlStringBuilder optIntAttribute(String name, int value) {
|
||||
|
@ -361,8 +361,8 @@ public class XmlStringBuilder implements Appendable, CharSequence, Element {
|
|||
/**
|
||||
* Add the given attribute if value not null and {@code value => 0}.
|
||||
*
|
||||
* @param name
|
||||
* @param value
|
||||
* @param name TODO javadoc me please
|
||||
* @param value TODO javadoc me please
|
||||
* @return a reference to this object
|
||||
*/
|
||||
public XmlStringBuilder optLongAttribute(String name, Long value) {
|
||||
|
@ -586,8 +586,9 @@ public class XmlStringBuilder implements Appendable, CharSequence, Element {
|
|||
* the single parts one-by-one, avoiding allocation of a big continuous memory block holding the
|
||||
* XmlStringBuilder contents.
|
||||
*
|
||||
* @param writer
|
||||
* @throws IOException
|
||||
* @param writer TODO javadoc me please
|
||||
* @param enclosingNamespace the enclosing XML namespace.
|
||||
* @throws IOException if an I/O error occured.
|
||||
*/
|
||||
public void write(Writer writer, String enclosingNamespace) throws IOException {
|
||||
for (CharSequence csq : sb.getAsList()) {
|
||||
|
|
|
@ -38,7 +38,7 @@ public class IQResponseTest {
|
|||
|
||||
/**
|
||||
* Test creating a simple and empty IQ response.
|
||||
* @throws XmppStringprepException
|
||||
* @throws XmppStringprepException if the provided string is invalid.
|
||||
*/
|
||||
@Test
|
||||
public void testGeneratingSimpleResponse() throws XmppStringprepException {
|
||||
|
@ -58,7 +58,7 @@ public class IQResponseTest {
|
|||
|
||||
/**
|
||||
* Test creating a error response based on an IQ request.
|
||||
* @throws XmppStringprepException
|
||||
* @throws XmppStringprepException if the provided string is invalid.
|
||||
*/
|
||||
@Test
|
||||
public void testGeneratingValidErrorResponse() throws XmppStringprepException {
|
||||
|
@ -83,7 +83,7 @@ public class IQResponseTest {
|
|||
/**
|
||||
* According to <a href="http://xmpp.org/rfcs/rfc3920.html#stanzas-semantics-iq"
|
||||
* >RFC3920: IQ Semantics</a> we shouldn't respond to an IQ of type result.
|
||||
* @throws XmppStringprepException
|
||||
* @throws XmppStringprepException if the provided string is invalid.
|
||||
*/
|
||||
@Test
|
||||
public void testGeneratingResponseBasedOnResult() throws XmppStringprepException {
|
||||
|
@ -106,7 +106,7 @@ public class IQResponseTest {
|
|||
/**
|
||||
* According to <a href="http://xmpp.org/rfcs/rfc3920.html#stanzas-semantics-iq"
|
||||
* >RFC3920: IQ Semantics</a> we shouldn't respond to an IQ of type error.
|
||||
* @throws XmppStringprepException
|
||||
* @throws XmppStringprepException if the provided string is invalid.
|
||||
*/
|
||||
@Test
|
||||
public void testGeneratingErrorBasedOnError() throws XmppStringprepException {
|
||||
|
|
|
@ -676,7 +676,7 @@ public class PacketParserUtilsTest {
|
|||
* RFC6121 5.2.3 explicitly disallows mixed content in <body/> elements. Make sure that we throw
|
||||
* an exception if we encounter such an element.
|
||||
*
|
||||
* @throws Exception
|
||||
* @throws Exception if an exception occurs.
|
||||
*/
|
||||
@Test
|
||||
public void invalidMessageBodyContainingTagTest() throws Exception {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue