Skip to content

Commit

Permalink
Add FinalClass checkstyle check
Browse files Browse the repository at this point in the history
And mark affected classes final.
  • Loading branch information
Flowdalic committed Apr 6, 2015
1 parent 5ae1fbd commit b4694ec
Show file tree
Hide file tree
Showing 72 changed files with 80 additions and 79 deletions.
1 change: 1 addition & 0 deletions config/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
</module>
<module name="JavadocPackage"/>
<module name="TreeWalker">
<module name="FinalClass"/>
<module name="FileContentsHolder"/>
<module name="UnusedImports">
<property name="processJavadoc" value="true"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
* functionality.
* </p>
*/
public class ServerPingWithAlarmManager extends Manager {
public final class ServerPingWithAlarmManager extends Manager {

private static final Logger LOGGER = Logger.getLogger(ServerPingWithAlarmManager.class
.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
* A Base 64 encoding implementation based on android.util.Base64.
* @author Florian Schmaus
*/
public class AndroidBase64Encoder implements org.jivesoftware.smack.util.stringencoder.Base64.Encoder {
public final class AndroidBase64Encoder implements org.jivesoftware.smack.util.stringencoder.Base64.Encoder {

private static AndroidBase64Encoder instance = new AndroidBase64Encoder();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import android.util.Base64;

public class AndroidBase64UrlSafeEncoder implements StringEncoder {
public final class AndroidBase64UrlSafeEncoder implements StringEncoder {

private static AndroidBase64UrlSafeEncoder instance = new AndroidBase64UrlSafeEncoder();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
* @see XMPPBOSHConnection
* @author Guenther Niess
*/
public class BOSHConfiguration extends ConnectionConfiguration {
public final class BOSHConfiguration extends ConnectionConfiguration {

private final boolean https;
private final String file;
Expand Down Expand Up @@ -73,7 +73,7 @@ public static Builder builder() {
return new Builder();
}

public static class Builder extends ConnectionConfiguration.Builder<Builder, BOSHConfiguration> {
public static final class Builder extends ConnectionConfiguration.Builder<Builder, BOSHConfiguration> {
private boolean https;
private String file;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public static Configuration newConfiguration() {
return new Configuration();
}

public static class Configuration {
public static final class Configuration {
private StanzaFilter packetFilter;
private int size = SmackConfiguration.getPacketCollectorSize();
private PacketCollector collectorToReset;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
* @author Francisco Vives
* @author Luca Stucchi
*/
public class ReconnectionManager {
public final class ReconnectionManager {
private static final Logger LOGGER = Logger.getLogger(ReconnectionManager.class.getName());

private static final Map<AbstractXMPPConnection, ReconnectionManager> INSTANCES = new WeakHashMap<AbstractXMPPConnection, ReconnectionManager>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ protected SmackException() {
* connection instance. You can modify (e.g. increase) the stanza(/packet) reply timeout with
* {@link XMPPConnection#setPacketReplyTimeout(long)}.
*/
public static class NoResponseException extends SmackException {
public static final class NoResponseException extends SmackException {
/**
*
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import org.jivesoftware.smack.packet.FullStreamElement;

public class Compressed extends FullStreamElement {
public final class Compressed extends FullStreamElement {

public static final String ELEMENT = "compressed";
public static final String NAMESPACE = Compress.NAMESPACE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @author Alexander Wenckus
*
*/
public class IQTypeFilter extends FlexibleStanzaTypeFilter<IQ> {
public final class IQTypeFilter extends FlexibleStanzaTypeFilter<IQ> {

public static final StanzaFilter GET = new IQTypeFilter(Type.get);
public static final StanzaFilter SET = new IQTypeFilter(Type.set);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
* @see org.jivesoftware.smack.packet.Message.Type
* @author Ward Harold
*/
public class MessageTypeFilter extends FlexibleStanzaTypeFilter<Message> {
public final class MessageTypeFilter extends FlexibleStanzaTypeFilter<Message> {

public static final StanzaFilter NORMAL = new MessageTypeFilter(Type.normal);
public static final StanzaFilter CHAT = new MessageTypeFilter(Type.chat);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/**
* Filters message stanzas which have at least one body.
*/
public class MessageWithBodiesFilter extends FlexibleStanzaTypeFilter<Message> {
public final class MessageWithBodiesFilter extends FlexibleStanzaTypeFilter<Message> {

public static final StanzaFilter INSTANCE = new MessageWithBodiesFilter();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
/**
* Filters message stanzas which have at least one body.
*/
public class MessageWithSubjectFilter extends FlexibleStanzaTypeFilter<Message> {
public final class MessageWithSubjectFilter extends FlexibleStanzaTypeFilter<Message> {

public static final StanzaFilter INSTANCE = new MessageWithSubjectFilter();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* A filter for Presence types. Returns true only if the stanza is an Presence stanza(/packet) and it matches the type provided in the
* constructor.
*/
public class PresenceTypeFilter extends FlexibleStanzaTypeFilter<Presence> {
public final class PresenceTypeFilter extends FlexibleStanzaTypeFilter<Presence> {

public static final PresenceTypeFilter AVAILABLE = new PresenceTypeFilter(Type.available);
public static final PresenceTypeFilter UNAVAILABLE = new PresenceTypeFilter(Type.unavailable);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ protected IQChildElementXmlStringBuilder getIQChildElementBuilder(IQChildElement
return xml;
}

public static class Feature implements ExtensionElement {
public static final class Feature implements ExtensionElement {

public static final Feature INSTANCE = new Feature();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@ public Message clone() {
/**
* Represents a message subject, its language and the content of the subject.
*/
public static class Subject {
public static final class Subject {

private final String subject;
private final String language;
Expand Down Expand Up @@ -544,7 +544,7 @@ public boolean equals(Object obj) {
/**
* Represents a message body, its language and the content of the message.
*/
public static class Body {
public static final class Body {

private final String message;
private final String language;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public Set<Map.Entry<K, V>> entrySet() {
return entrySet;
}

private static class SimpleMapEntry<K, V> implements Map.Entry<K, V> {
private static final class SimpleMapEntry<K, V> implements Map.Entry<K, V> {

private final K key;
private V value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ public static Builder builder() {
return new Builder();
}

public static class Builder
public static final class Builder
extends
ConnectionConfiguration.Builder<Builder, DummyConnectionConfiguration> {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
*
* @author Gaston Dombiak
*/
public class EnhancedDebuggerWindow {
public final class EnhancedDebuggerWindow {

private static EnhancedDebuggerWindow instance;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
*
* @author Georg Lukas
*/
public class CarbonManager extends Manager {
public final class CarbonManager extends Manager {

private static Map<XMPPConnection, CarbonManager> INSTANCES = new WeakHashMap<XMPPConnection, CarbonManager>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public static enum Direction {
* Stanza(/Packet) extension indicating that a message may not be carbon-copied. Adding this
* extension to any message will disallow that message from being copied.
*/
public static class Private implements ExtensionElement {
public static final class Private implements ExtensionElement {
public static final Private INSTANCE = new Private();
public static final String ELEMENT = "private";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
public class ClientStateIndication {
public static final String NAMESPACE = "urn:xmpp:csi:0";

public static class Active extends FullStreamElement {
public static final class Active extends FullStreamElement {
public static final Active INSTANCE = new Active();
public static final String ELEMENT = "active";

Expand All @@ -50,7 +50,7 @@ public String toXML() {
}
}

public static class Inactive extends FullStreamElement {
public static final class Inactive extends FullStreamElement {
public static final Inactive INSTANCE = new Inactive();
public static final String ELEMENT = "inactive";

Expand All @@ -73,7 +73,7 @@ public String toXML() {
}
}

public static class Feature implements ExtensionElement {
public static final class Feature implements ExtensionElement {
public static final Feature INSTANCE = new Feature();
public static final String ELEMENT = "csi";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public XmlStringBuilder toXML() {
return buf;
}

public static class Address implements NamedElement {
public static final class Address implements NamedElement {

public static final String ELEMENT = "address";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
*
* @author Alexander Wenckus
*/
public class BookmarkManager {
public final class BookmarkManager {
private static final Map<XMPPConnection, BookmarkManager> bookmarkManagerMap = new WeakHashMap<XMPPConnection, BookmarkManager>();

static {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
*
* @author Henning Staib
*/
public class InBandBytestreamManager implements BytestreamManager {
public final class InBandBytestreamManager implements BytestreamManager {

/**
* Stanzas that can be used to encapsulate In-Band Bytestream data packets.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
*
* @author Henning Staib
*/
public class Socks5Proxy {
public final class Socks5Proxy {
private static final Logger LOGGER = Logger.getLogger(Socks5Proxy.class.getName());

/* SOCKS5 proxy singleton */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
* @author Florian Schmaus
* @see <a href="http://www.xmpp.org/extensions/xep-0115.html">XEP-0115: Entity Capabilities</a>
*/
public class EntityCapsManager extends Manager {
public final class EntityCapsManager extends Manager {
private static final Logger LOGGER = Logger.getLogger(EntityCapsManager.class.getName());

public static final String NAMESPACE = CapsExtension.NAMESPACE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
* @see org.jivesoftware.smackx.chatstates.ChatState
* @see org.jivesoftware.smackx.chatstates.packet.ChatStateExtension
*/
public class ChatStateManager extends Manager {
public final class ChatStateManager extends Manager {
public static final String NAMESPACE = "http://jabber.org/protocol/chatstates";

private static final Map<XMPPConnection, ChatStateManager> INSTANCES =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
*
* @author Gabriel Guardincerri
*/
public class AdHocCommandManager extends Manager {
public final class AdHocCommandManager extends Manager {
public static final String NAMESPACE = "http://jabber.org/protocol/commands";

private static final Logger LOGGER = Logger.getLogger(AdHocCommandManager.class.getName());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/**
* Filters stanza with delay information, ie. stanzas that got delayed for some reason
*/
public class DelayedStanzaFilter implements StanzaFilter {
public final class DelayedStanzaFilter implements StanzaFilter {

public static final StanzaFilter INSTANCE = new DelayedStanzaFilter();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
*
* @author Gaston Dombiak
*/
public class ServiceDiscoveryManager extends Manager {
public final class ServiceDiscoveryManager extends Manager {

private static final Logger LOGGER = Logger.getLogger(ServiceDiscoveryManager.class.getName());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
* @author Alexander Wenckus
*
*/
public class FileTransferManager extends Manager {
public final class FileTransferManager extends Manager {

private static final Map<XMPPConnection, FileTransferManager> INSTANCES = new WeakHashMap<XMPPConnection, FileTransferManager>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
* @author Alexander Wenckus
* @see <a href="http://xmpp.org/extensions/xep-0096.html">XEP-0096: SI File Transfer</a>
*/
public class FileTransferNegotiator extends Manager {
public final class FileTransferNegotiator extends Manager {

public static final String SI_NAMESPACE = "http://jabber.org/protocol/si";
public static final String SI_PROFILE_FILE_TRANSFER_NAMESPACE = "http://jabber.org/protocol/si/profile/file-transfer";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ InputStream negotiateIncomingStream(Stanza streamInitiation) throws NotConnected
/**
* Derive from InBandBytestreamRequest to access protected constructor.
*/
private static class ByteStreamRequest extends InBandBytestreamRequest {
private static final class ByteStreamRequest extends InBandBytestreamRequest {

private ByteStreamRequest(InBandBytestreamManager manager, Open byteStreamRequest) {
super(manager, byteStreamRequest);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ InputStream negotiateIncomingStream(Stanza streamInitiation) throws InterruptedE
/**
* Derive from Socks5BytestreamRequest to access protected constructor.
*/
private static class ByteStreamRequest extends Socks5BytestreamRequest {
private static final class ByteStreamRequest extends Socks5BytestreamRequest {

private ByteStreamRequest(Socks5BytestreamManager manager, Bytestream byteStreamRequest) {
super(manager, byteStreamRequest);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import org.jivesoftware.smackx.geoloc.packet.GeoLocation;
import org.jxmpp.jid.Jid;

public class GeoLocationManager extends Manager {
public final class GeoLocationManager extends Manager {

private static final Map<XMPPConnection, GeoLocationManager> INSTANCES = new WeakHashMap<XMPPConnection, GeoLocationManager>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* @see <a href="http://www.xmpp.org/extensions/xep-0080.html">XEP-0080</a>
* @author Ishan Khanna
*/
public class GeoLocation implements Serializable, ExtensionElement {
public final class GeoLocation implements Serializable, ExtensionElement {

private static final long serialVersionUID = 1L;
public static final String NAMESPACE = "http://jabber.org/protocol/geoloc";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
* Activity</a>
*/

public class LastActivityManager extends Manager {
public final class LastActivityManager extends Manager {
private static final Map<XMPPConnection, LastActivityManager> instances = new WeakHashMap<XMPPConnection, LastActivityManager>();
// private static final PacketFilter IQ_GET_LAST_FILTER = new AndFilter(IQTypeFilter.GET,
// new StanzaTypeFilter(LastActivity.class));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
*
* @author Matt Tucker
*/
public class PrivateDataManager extends Manager {
public final class PrivateDataManager extends Manager {
private static final Map<XMPPConnection, PrivateDataManager> instances = new WeakHashMap<XMPPConnection, PrivateDataManager>();

public static synchronized PrivateDataManager getInstanceFor(XMPPConnection connection) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
*
* @author Matt Tucker
*/
public class AccountManager extends Manager {
public final class AccountManager extends Manager {

private static final Logger LOGGER = Logger.getLogger(AccountManager.class.getName());

Expand Down
Loading

0 comments on commit b4694ec

Please sign in to comment.