1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2025-09-10 17:49:38 +02:00

Enable javadoc checkstyle

and fix violations.
This commit is contained in:
Florian Schmaus 2015-03-29 12:15:32 +02:00
parent 57260b2a44
commit 64d134052d
198 changed files with 529 additions and 501 deletions

View file

@ -16,9 +16,6 @@
*/
package org.jivesoftware.smack;
/**
*
*/
public abstract class AbstractConnectionClosedListener extends AbstractConnectionListener {
@Override

View file

@ -47,7 +47,6 @@ import org.jivesoftware.smack.SmackException.AlreadyConnectedException;
import org.jivesoftware.smack.SmackException.AlreadyLoggedInException;
import org.jivesoftware.smack.SmackException.NoResponseException;
import org.jivesoftware.smack.SmackException.NotConnectedException;
import org.jivesoftware.smack.SmackException.ConnectionException;
import org.jivesoftware.smack.SmackException.ResourceBindingNotOfferedException;
import org.jivesoftware.smack.SmackException.SecurityRequiredException;
import org.jivesoftware.smack.XMPPException.StreamErrorException;
@ -342,7 +341,6 @@ 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 ConnectionException with detailed information about the failed connection.
* @return a reference to this object, to chain <code>connect()</code> with <code>login()</code>.
* @throws InterruptedException
*/
@ -1554,7 +1552,7 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
/**
* Install a parsing exception callback, which will be invoked once an exception is encountered while parsing a
* stanza
* stanza.
*
* @param callback the callback to install
*/

View file

@ -497,7 +497,7 @@ public abstract class ConnectionConfiguration {
/**
* Sets the PKCS11 library file location, needed when the
* Keystore type is PKCS11
* Keystore type is PKCS11.
*
* @param pkcs11Library the path to the PKCS11 library file.
* @return a reference to this builder.

View file

@ -19,9 +19,6 @@ package org.jivesoftware.smack;
import org.jivesoftware.smack.packet.Message;
/**
*
*/
public interface MessageListener {
void processMessage(Message message);
}

View file

@ -18,6 +18,7 @@
package org.jivesoftware.smack;
/**
* This interface is deprecated.
* @deprecated use {@link StanzaListener} instead
*/
@Deprecated

View file

@ -19,9 +19,6 @@ package org.jivesoftware.smack;
import org.jivesoftware.smack.packet.Presence;
/**
*
*/
public interface PresenceListener {
void processPresence(Presence presence);
}

View file

@ -121,7 +121,7 @@ public class ReconnectionManager {
}
/**
* Set the default Reconnection Policy to use
* Set the default Reconnection Policy to use.
*
* @param reconnectionPolicy
*/
@ -131,7 +131,7 @@ public class ReconnectionManager {
/**
* Set the fixed delay in seconds between the reconnection attempts Also set the connection
* policy to {@link ReconnectionPolicy#FIXED_DELAY}
* policy to {@link ReconnectionPolicy#FIXED_DELAY}.
*
* @param fixedDelay Delay expressed in seconds
*/
@ -141,7 +141,7 @@ public class ReconnectionManager {
}
/**
* Set the Reconnection Policy to use
* Set the Reconnection Policy to use.
*
* @param reconnectionPolicy
*/
@ -150,7 +150,7 @@ public class ReconnectionManager {
}
/**
* Flag that indicates if a reconnection should be attempted when abruptly disconnected
* Flag that indicates if a reconnection should be attempted when abruptly disconnected.
*/
private boolean automaticReconnectEnabled = false;
@ -357,17 +357,17 @@ public class ReconnectionManager {
/**
* Reconnection Policy, where {@link ReconnectionPolicy#RANDOM_INCREASING_DELAY} is the default policy used by smack and {@link ReconnectionPolicy#FIXED_DELAY} implies
* a fixed amount of time between reconnection attempts
* a fixed amount of time between reconnection attempts.
*/
public enum ReconnectionPolicy {
/**
* Default policy classically used by smack, having an increasing delay related to the
* overall number of attempts
* overall number of attempts.
*/
RANDOM_INCREASING_DELAY,
/**
* Policy using fixed amount of time between reconnection attempts
* Policy using fixed amount of time between reconnection attempts.
*/
FIXED_DELAY,
;

View file

@ -65,7 +65,7 @@ public class SASLAuthentication {
private static final Set<String> BLACKLISTED_MECHANISMS = new HashSet<String>();
/**
* Registers a new SASL mechanism
* Registers a new SASL mechanism.
*
* @param mechanism a SASLMechanism subclass.
*/

View file

@ -175,6 +175,8 @@ public final class SmackConfiguration {
}
/**
* Get the debugger factory.
*
* @return a debugger factory or <code>null</code>
*/
public static SmackDebuggerFactory getDebuggerFactory() {
@ -230,7 +232,7 @@ public final class SmackConfiguration {
}
/**
* Set the default parsing exception callback for all newly created connections
* Set the default parsing exception callback for all newly created connections.
*
* @param callback
* @see ParsingExceptionCallback
@ -240,7 +242,7 @@ public final class SmackConfiguration {
}
/**
* Returns the default parsing exception callback
* Returns the default parsing exception callback.
*
* @return the default parsing exception callback
* @see ParsingExceptionCallback

View file

@ -44,7 +44,7 @@ public class ReflectionDebuggerFactory implements SmackDebuggerFactory {
};
/**
* Sets custom debugger class to be created by this factory
* Sets custom debugger class to be created by this factory.
* @param debuggerClass class to be used by this factory
*/
public static void setDebuggerClass(Class<? extends SmackDebugger> debuggerClass) {
@ -56,7 +56,7 @@ public class ReflectionDebuggerFactory implements SmackDebuggerFactory {
}
/**
* Returns debugger class used by this factory
* Returns debugger class used by this factory.
* @return debugger class that will be used for instantiation by this factory
*/
@SuppressWarnings("unchecked")

View file

@ -24,9 +24,6 @@ import java.util.List;
import org.jivesoftware.smack.util.Objects;
/**
*
*/
public abstract class AbstractListFilter implements StanzaFilter {
/**

View file

@ -20,9 +20,6 @@ import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.packet.Stanza;
/**
*
*/
public class IQResultReplyFilter extends IQReplyFilter {

View file

@ -20,7 +20,7 @@ package org.jivesoftware.smack.filter;
import org.jivesoftware.smack.packet.Message;
/**
* Filters message stanzas which have at least one body
* Filters message stanzas which have at least one body.
*/
public class MessageWithBodiesFilter extends FlexibleStanzaTypeFilter<Message> {

View file

@ -20,7 +20,7 @@ package org.jivesoftware.smack.filter;
import org.jivesoftware.smack.packet.Message;
/**
* Filters message stanzas which have at least one body
* Filters message stanzas which have at least one body.
*/
public class MessageWithSubjectFilter extends FlexibleStanzaTypeFilter<Message> {

View file

@ -39,7 +39,7 @@ public interface Packet extends TopLevelStreamElement {
public String getStanzaId();
/**
*
* Get the stanza id.
* @return the stanza id.
* @deprecated use {@link #getStanzaId()} instead.
*/
@ -55,7 +55,7 @@ public interface Packet extends TopLevelStreamElement {
public void setStanzaId(String id);
/**
*
* Set the stanza ID.
* @param packetID
* @deprecated use {@link #setStanzaId(String)} instead.
*/

View file

@ -304,7 +304,7 @@ public final class Presence extends Stanza implements TypedCloneable<Presence> {
error,
/**
* A presence probe as defined in section 4.3 of RFC 6121
* A presence probe as defined in section 4.3 of RFC 6121.
*/
probe,
;

View file

@ -105,7 +105,7 @@ public abstract class Stanza implements TopLevelStreamElement {
}
/**
*
* Get the Stanza ID.
* @return the stanza id.
* @deprecated use {@link #getStanzaId()} instead.
*/
@ -128,7 +128,7 @@ public abstract class Stanza implements TopLevelStreamElement {
}
/**
*
* Set the stanza ID.
* @param packetID
* @deprecated use {@link #setStanzaId(String)} instead.
*/

View file

@ -149,7 +149,7 @@ public class StreamError extends AbstractError implements PlainStreamElement {
}
/**
* The defined stream error conditions, see RFC 6120 § 4.9.3
* The defined stream error conditions, see RFC 6120 § 4.9.3.
*
*/
public enum Condition {

View file

@ -21,7 +21,7 @@ import org.jivesoftware.smack.util.StringUtils;
import org.jivesoftware.smack.util.XmlStringBuilder;
/**
*
* The stream open <b>tag</b>.
*/
public class StreamOpen extends FullStreamElement {
@ -31,32 +31,32 @@ public class StreamOpen extends FullStreamElement {
public static final String SERVER_NAMESPACE = "jabber:server";
/**
* RFC 6120 § 4.7.5
* RFC 6120 § 4.7.5.
*/
public static final String VERSION = "1.0";
/**
* RFC 6120 § 4.7.1
* RFC 6120 § 4.7.1.
*/
private final String from;
/**
* RFC 6120 § 4.7.2
* RFC 6120 § 4.7.2.
*/
private final String to;
/**
* RFC 6120 § 4.7.3
* RFC 6120 § 4.7.3.
*/
private final String id;
/**
* RFC 6120 § 4.7.4
* RFC 6120 § 4.7.4.
*/
private final String lang;
/**
* RFC 6120 § 4.8.2
* RFC 6120 § 4.8.2.
*/
private final String contentNamespace;

View file

@ -34,7 +34,7 @@ public class UnparsablePacket {
}
/**
*
* Get the exception that caused the parser to fail.
* @return the exception that caused the parser to fail
*/
public Exception getParsingException() {
@ -42,7 +42,7 @@ public class UnparsablePacket {
}
/**
* Retrieve the raw stanza data
* Retrieve the raw stanza data.
*
* @return the raw stanza data
*/

View file

@ -18,9 +18,6 @@ package org.jivesoftware.smack.provider;
import org.jivesoftware.smack.packet.ExtensionElement;
/**
*
*/
public final class StreamFeatureProviderInfo extends AbstractProviderInfo {
/**

View file

@ -26,7 +26,7 @@ import java.net.UnknownHostException;
import javax.net.SocketFactory;
/**
* Socket factory for socks4 proxy
* Socket factory for socks4 proxy.
*
* @author Atul Aggarwal
*/

View file

@ -25,7 +25,7 @@ import java.net.UnknownHostException;
import javax.net.SocketFactory;
/**
* Socket factory for Socks5 proxy
* Socket factory for Socks5 proxy.
*
* @author Atul Aggarwal
*/

View file

@ -21,7 +21,7 @@ import org.jivesoftware.smack.SmackException;
import javax.security.auth.callback.CallbackHandler;
/**
* Implementation of the SASL ANONYMOUS mechanism
* Implementation of the SASL ANONYMOUS mechanism.
*
* @author Jay Kline
*/

View file

@ -122,7 +122,7 @@ public class SaslStreamElements {
final private String data;
/**
* Construct a new SASL success stream element with optional additional data for the SASL layer
* Construct a new SASL success stream element with optional additional data for the SASL layer.
* (RFC6120 6.3.10)
*
* @param data additional data for the SASL layer or <code>null</code>
@ -151,7 +151,7 @@ public class SaslStreamElements {
}
/**
* A SASL failure stream element, also called "SASL Error"
* A SASL failure stream element, also called "SASL Error".
* @see <a href="http://xmpp.org/rfcs/rfc6120.html#sasl-errors">RFC 6120 6.5 SASL Errors</a>
*/
public static class SASLFailure extends AbstractError implements PlainStreamElement {
@ -188,6 +188,7 @@ public class SaslStreamElements {
}
/**
* Get the SASL error as String.
* @return the SASL error as String
*/
public String getSASLErrorString() {

View file

@ -96,7 +96,7 @@ public final class FileUtils {
}
/**
* Reads the contents of a File
* Reads the contents of a File.
*
* @param file
* @return the content of file or null in case of an error

View file

@ -28,7 +28,6 @@ import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.jivesoftware.smack.SmackException;
import org.jivesoftware.smack.compress.packet.Compress;
import org.jivesoftware.smack.packet.DefaultExtensionElement;
import org.jivesoftware.smack.packet.EmptyResultIQ;
@ -593,9 +592,7 @@ public class PacketParserUtils {
*
* @param parser the XML parser, positioned at the start of an IQ packet.
* @return an IQ object.
* @throws XmlPullParserException
* @throws IOException
* @throws SmackException
* @throws Exception
*/
public static IQ parseIQ(XmlPullParser parser) throws Exception {
ParserUtils.assertAtStartTag(parser);
@ -887,6 +884,7 @@ public class PacketParserUtils {
}
/**
* Parse an extension element.
* @deprecated use {@link #parseExtensionElement(String, String, XmlPullParser)} instead.
*/
@Deprecated

View file

@ -23,7 +23,7 @@ import org.jivesoftware.smack.packet.ExtensionElement;
public class PacketUtil {
/**
* Get a extension element from a collection
* Get a extension element from a collection.
*
* @param collection
* @param element
@ -39,7 +39,7 @@ public class PacketUtil {
}
/**
* Get a extension element from a collection
* Get a extension element from a collection.
*
* @param collection
* @param element

View file

@ -187,7 +187,7 @@ public class StringUtils {
}
/**
* Returns true if CharSequence is not null and is not empty, false otherwise
* Returns true if CharSequence is not null and is not empty, false otherwise.
* Examples:
* isNotEmpty(null) - false
* isNotEmpty("") - false
@ -212,7 +212,7 @@ public class StringUtils {
}
/**
* Returns true if the given CharSequence is empty
* Returns true if the given CharSequence is empty.
*
* @param cs
* @return true if the given CharSequence is empty

View file

@ -50,6 +50,7 @@ public class XmlStringBuilder implements Appendable, CharSequence {
}
/**
* Add a new element to this builder.
*
* @param name
* @param content
@ -64,6 +65,7 @@ public class XmlStringBuilder implements Appendable, CharSequence {
}
/**
* Add a new element to this builder.
*
* @param name
* @param content
@ -158,7 +160,7 @@ public class XmlStringBuilder implements Appendable, CharSequence {
}
/**
* Add a right angle bracket '>'
* Add a right angle bracket '>'.
*
* @return a reference to this object.
*/
@ -168,7 +170,7 @@ public class XmlStringBuilder implements Appendable, CharSequence {
}
/**
*
* Add a right angle bracket '>'.
* @return a reference to this object
* @deprecated use {@link #rightAngleBracket()} instead
*/
@ -229,7 +231,7 @@ public class XmlStringBuilder implements Appendable, CharSequence {
}
/**
* Add the given attribute if value => 0
* Add the given attribute if {@code value => 0}.
*
* @param name
* @param value

View file

@ -17,6 +17,8 @@
package org.jivesoftware.smack.util.dns;
/**
* A DNS SRV RR.
*
* @see <a href="http://tools.ietf.org/html/rfc2782">RFC 2782: A DNS RR for specifying the location of services (DNS
* SRV)</a>
* @author Florian Schmaus
@ -28,7 +30,7 @@ public class SRVRecord extends HostAddress implements Comparable<SRVRecord> {
private int priority;
/**
* Create a new SRVRecord
* SRV Record constructor.
*
* @param fqdn Fully qualified domain name
* @param port The connection port

View file

@ -17,11 +17,13 @@
package org.jivesoftware.smack.util.stringencoder;
/**
* An interface for String encoder.
*
* @author Florian Schmaus
*/
public interface StringEncoder {
/**
* Encodes an string to another representation
* Encodes an string to another representation.
*
* @param string
* @return the encoded String
@ -29,7 +31,7 @@ public interface StringEncoder {
String encode(String string);
/**
* Decodes an string back to it's initial representation
* Decodes an string back to it's initial representation.
*
* @param string
* @return the decoded String

View file

@ -30,7 +30,7 @@ import org.jivesoftware.smack.packet.Stanza;
import org.jivesoftware.smack.packet.IQ.Type;
/**
*
* A threaded dummy connection.
* @author Robin Collier
*
*/

View file

@ -24,9 +24,6 @@ import org.jivesoftware.smack.filter.StanzaIdFilter;
import org.jivesoftware.smack.filter.ThreadFilter;
import org.junit.Test;
/**
*
*/
public class FilterToStringTest {
@Test

View file

@ -27,7 +27,7 @@ import org.jxmpp.jid.Jid;
import org.jxmpp.jid.JidTestUtil;
/**
*
* From matches filter test.
* @author Robin Collier
*
*/

View file

@ -30,9 +30,6 @@ import java.util.Collection;
import java.util.List;
import java.util.ArrayList;
/**
*
*/
public class MessageTest {
@Test

View file

@ -27,9 +27,6 @@ import org.xml.sax.SAXException;
import java.io.IOException;
/**
*
*/
public class PresenceTest {
@Test
public void setPresenceTypeTest() throws IOException, SAXException {

View file

@ -47,9 +47,6 @@ import org.xmlpull.v1.XmlPullParserException;
import com.jamesmurty.utils.XMLBuilder;
/**
*
*/
public class PacketParserUtilsTest {
private static Properties outputProperties = new Properties();