Enable RedundantModifier checkstyle check

This commit is contained in:
Florian Schmaus 2018-03-28 14:02:21 +02:00
parent 193688e553
commit b5209f4701
36 changed files with 86 additions and 85 deletions

View File

@ -74,6 +74,7 @@
<module name="AvoidStarImport"/> <module name="AvoidStarImport"/>
<module name="IllegalImport"/> <module name="IllegalImport"/>
<module name="RedundantImport"/> <module name="RedundantImport"/>
<module name="RedundantModifier"/>
<module name="UpperEll"/> <module name="UpperEll"/>
<module name="ArrayTypeStyle"/> <module name="ArrayTypeStyle"/>
<module name="GenericWhitespace"/> <module name="GenericWhitespace"/>

View File

@ -338,7 +338,7 @@ public interface XMPPConnection {
* @param packetListener the stanza(/packet) listener to notify of sent packets. * @param packetListener the stanza(/packet) listener to notify of sent packets.
* @param packetFilter the stanza(/packet) filter to use. * @param packetFilter the stanza(/packet) filter to use.
*/ */
public void addStanzaSendingListener(StanzaListener packetListener, StanzaFilter packetFilter); void addStanzaSendingListener(StanzaListener packetListener, StanzaFilter packetFilter);
/** /**
* Removes a stanza(/packet) listener for sending packets from this connection. * Removes a stanza(/packet) listener for sending packets from this connection.
@ -355,7 +355,7 @@ public interface XMPPConnection {
* *
* @param packetListener the stanza(/packet) listener to remove. * @param packetListener the stanza(/packet) listener to remove.
*/ */
public void removeStanzaSendingListener(StanzaListener packetListener); void removeStanzaSendingListener(StanzaListener packetListener);
/** /**
* Registers a stanza(/packet) interceptor with this connection. The interceptor will be * Registers a stanza(/packet) interceptor with this connection. The interceptor will be
@ -582,7 +582,7 @@ public interface XMPPConnection {
@Deprecated @Deprecated
// TODO: Remove in Smack 4.4. // TODO: Remove in Smack 4.4.
void sendStanzaWithResponseCallback(Stanza stanza, StanzaFilter replyFilter, void sendStanzaWithResponseCallback(Stanza stanza, StanzaFilter replyFilter,
final StanzaListener callback, @SuppressWarnings("deprecation") final ExceptionCallback exceptionCallback, StanzaListener callback, @SuppressWarnings("deprecation") ExceptionCallback exceptionCallback,
long timeout) throws NotConnectedException, InterruptedException; long timeout) throws NotConnectedException, InterruptedException;
/** /**
@ -638,8 +638,8 @@ public interface XMPPConnection {
*/ */
@Deprecated @Deprecated
// TODO: Remove in Smack 4.4. // TODO: Remove in Smack 4.4.
void sendIqWithResponseCallback(IQ iqRequest, final StanzaListener callback, void sendIqWithResponseCallback(IQ iqRequest, StanzaListener callback,
@SuppressWarnings("deprecation") final ExceptionCallback exceptionCallback, long timeout) @SuppressWarnings("deprecation") ExceptionCallback exceptionCallback, long timeout)
throws NotConnectedException, InterruptedException; throws NotConnectedException, InterruptedException;
/** /**

View File

@ -317,7 +317,7 @@ public class XMPPError extends AbstractError {
* <li>XMPPError.Type.CONTINUE - proceed (the condition was only a warning) * <li>XMPPError.Type.CONTINUE - proceed (the condition was only a warning)
* </ul> * </ul>
*/ */
public static enum Type { public enum Type {
WAIT, WAIT,
CANCEL, CANCEL,
MODIFY, MODIFY,

View File

@ -203,7 +203,7 @@ public abstract class SASLMechanism implements Comparable<SASLMechanism> {
protected abstract void authenticateInternal(CallbackHandler cbh) throws SmackException; protected abstract void authenticateInternal(CallbackHandler cbh) throws SmackException;
private final void authenticate() throws SmackException, NotConnectedException, InterruptedException { private void authenticate() throws SmackException, NotConnectedException, InterruptedException {
byte[] authenticationBytes = getAuthenticationText(); byte[] authenticationBytes = getAuthenticationText();
String authenticationText; String authenticationText;
// Some SASL mechanisms do return an empty array (e.g. EXTERNAL from javax), so check that // Some SASL mechanisms do return an empty array (e.g. EXTERNAL from javax), so check that

View File

@ -226,7 +226,7 @@ public abstract class ScramMechanism extends SASLMechanism {
return null; return null;
} }
private final String getGS2Header() { private String getGS2Header() {
String authzidPortion = ""; String authzidPortion = "";
if (authorizationId != null) { if (authorizationId != null) {
authzidPortion = "a=" + authorizationId; authzidPortion = "a=" + authorizationId;
@ -238,7 +238,7 @@ public abstract class ScramMechanism extends SASLMechanism {
return cbName + ',' + authzidPortion + ","; return cbName + ',' + authzidPortion + ",";
} }
private final byte[] getCBindInput() throws SmackException { private byte[] getCBindInput() throws SmackException {
byte[] cbindData = getChannelBindingData(); byte[] cbindData = getChannelBindingData();
byte[] gs2Header = toBytes(getGS2Header()); byte[] gs2Header = toBytes(getGS2Header());
@ -409,7 +409,7 @@ public abstract class ScramMechanism extends SASLMechanism {
private final byte[] clientKey; private final byte[] clientKey;
private final byte[] serverKey; private final byte[] serverKey;
public Keys(byte[] clientKey, byte[] serverKey) { Keys(byte[] clientKey, byte[] serverKey) {
this.clientKey = clientKey; this.clientKey = clientKey;
this.serverKey = serverKey; this.serverKey = serverKey;
} }

View File

@ -53,18 +53,18 @@ public class ArrayBlockingQueueWithShutdown<E> extends AbstractQueue<E> implemen
private volatile boolean isShutdown = false; private volatile boolean isShutdown = false;
private final int inc(int i) { private int inc(int i) {
return (++i == items.length) ? 0 : i; return (++i == items.length) ? 0 : i;
} }
private final void insert(E e) { private void insert(E e) {
items[putIndex] = e; items[putIndex] = e;
putIndex = inc(putIndex); putIndex = inc(putIndex);
count++; count++;
notEmpty.signal(); notEmpty.signal();
} }
private final E extract() { private E extract() {
E e = items[takeIndex]; E e = items[takeIndex];
items[takeIndex] = null; items[takeIndex] = null;
takeIndex = inc(takeIndex); takeIndex = inc(takeIndex);
@ -73,7 +73,7 @@ public class ArrayBlockingQueueWithShutdown<E> extends AbstractQueue<E> implemen
return e; return e;
} }
private final void removeAt(int i) { private void removeAt(int i) {
if (i == takeIndex) { if (i == takeIndex) {
items[takeIndex] = null; items[takeIndex] = null;
takeIndex = inc(takeIndex); takeIndex = inc(takeIndex);
@ -96,31 +96,31 @@ public class ArrayBlockingQueueWithShutdown<E> extends AbstractQueue<E> implemen
notFull.signal(); notFull.signal();
} }
private final static void checkNotNull(Object o) { private static void checkNotNull(Object o) {
if (o == null) { if (o == null) {
throw new NullPointerException(); throw new NullPointerException();
} }
} }
private final void checkNotShutdown() throws InterruptedException { private void checkNotShutdown() throws InterruptedException {
if (isShutdown) { if (isShutdown) {
throw new InterruptedException(); throw new InterruptedException();
} }
} }
private final boolean hasNoElements() { private boolean hasNoElements() {
return count == 0; return count == 0;
} }
private final boolean hasElements() { private boolean hasElements() {
return !hasNoElements(); return !hasNoElements();
} }
private final boolean isFull() { private boolean isFull() {
return count == items.length; return count == items.length;
} }
private final boolean isNotFull() { private boolean isNotFull() {
return !isFull(); return !isFull();
} }

View File

@ -110,7 +110,7 @@ public class DNSUtil {
DNSUtil.idnaTransformer = idnaTransformer; DNSUtil.idnaTransformer = idnaTransformer;
} }
private static enum DomainType { private enum DomainType {
Server, Server,
Client, Client,
; ;

View File

@ -92,6 +92,6 @@ public class EventManger<K, R, E extends Exception> {
} }
public interface Callback<E extends Exception> { public interface Callback<E extends Exception> {
public void action() throws E; void action() throws E;
} }
} }

View File

@ -110,7 +110,7 @@ public abstract class DNSResolver {
return false; return false;
} }
private final void checkIfDnssecRequestedAndSupported(DnssecMode dnssecMode) { private void checkIfDnssecRequestedAndSupported(DnssecMode dnssecMode) {
if (dnssecMode != DnssecMode.disabled && !supportsDnssec) { if (dnssecMode != DnssecMode.disabled && !supportsDnssec) {
throw new UnsupportedOperationException("This resolver does not support DNSSEC"); throw new UnsupportedOperationException("This resolver does not support DNSSEC");
} }

View File

@ -197,7 +197,7 @@ public class StanzaCollectorTest
static class TestPacket extends Stanza static class TestPacket extends Stanza
{ {
public TestPacket(int i) TestPacket(int i)
{ {
setStanzaId(String.valueOf(i)); setStanzaId(String.valueOf(i));
} }

View File

@ -29,7 +29,7 @@ class SLF4JLoggingConnectionListener extends AbstractConnectionListener implemen
private final XMPPConnection connection; private final XMPPConnection connection;
private final Logger logger; private final Logger logger;
public SLF4JLoggingConnectionListener(XMPPConnection connection, Logger logger) { SLF4JLoggingConnectionListener(XMPPConnection connection, Logger logger) {
this.connection = Validate.notNull(connection); this.connection = Validate.notNull(connection);
this.logger = Validate.notNull(logger); this.logger = Validate.notNull(logger);
} }

View File

@ -25,7 +25,7 @@ import org.slf4j.Logger;
class SLF4JRawXmlListener implements ReaderListener, WriterListener { class SLF4JRawXmlListener implements ReaderListener, WriterListener {
private final Logger logger; private final Logger logger;
public SLF4JRawXmlListener(Logger logger) { SLF4JRawXmlListener(Logger logger) {
this.logger = Validate.notNull(logger); this.logger = Validate.notNull(logger);
} }

View File

@ -934,7 +934,7 @@ public class EnhancedDebugger extends SmackDebugger {
* The whole text to send must be passed to the constructor. This implies that the client of * The whole text to send must be passed to the constructor. This implies that the client of
* this class is responsible for sending a valid text to the constructor. * this class is responsible for sending a valid text to the constructor.
*/ */
private static class AdHocPacket extends Stanza { private static final class AdHocPacket extends Stanza {
private final String text; private final String text;
@ -944,7 +944,7 @@ public class EnhancedDebugger extends SmackDebugger {
* *
* @param text the whole text of the stanza(/packet) to send * @param text the whole text of the stanza(/packet) to send
*/ */
public AdHocPacket(String text) { private AdHocPacket(String text) {
this.text = text; this.text = text;
} }

View File

@ -293,7 +293,7 @@ public class MultipleRecipientManager {
* (i.e. cannot change the TO address of a queues stanza(/packet) to be sent) then this class was * (i.e. cannot change the TO address of a queues stanza(/packet) to be sent) then this class was
* created to keep the XML stanza to send. * created to keep the XML stanza to send.
*/ */
private static class PacketCopy extends Stanza { private static final class PacketCopy extends Stanza {
private final CharSequence text; private final CharSequence text;
@ -303,7 +303,7 @@ public class MultipleRecipientManager {
* *
* @param text the whole text of the stanza(/packet) to send * @param text the whole text of the stanza(/packet) to send
*/ */
public PacketCopy(CharSequence text) { private PacketCopy(CharSequence text) {
this.text = text; this.text = text;
} }

View File

@ -48,7 +48,7 @@ class DataListener extends AbstractIqRequestHandler {
* *
* @param manager the In-Band Bytestream manager * @param manager the In-Band Bytestream manager
*/ */
public DataListener(InBandBytestreamManager manager) { DataListener(InBandBytestreamManager manager) {
super(DataPacketExtension.ELEMENT, DataPacketExtension.NAMESPACE, IQ.Type.set, Mode.async); super(DataPacketExtension.ELEMENT, DataPacketExtension.NAMESPACE, IQ.Type.set, Mode.async);
this.manager = manager; this.manager = manager;
} }

View File

@ -274,7 +274,7 @@ public class InBandBytestreamSession implements BytestreamSession {
/** /**
* Constructor. * Constructor.
*/ */
public IBBInputStream() { protected IBBInputStream() {
// add data packet listener to connection // add data packet listener to connection
this.dataPacketListener = getDataPacketListener(); this.dataPacketListener = getDataPacketListener();
connection.addSyncStanzaListener(this.dataPacketListener, getDataPacketFilter()); connection.addSyncStanzaListener(this.dataPacketListener, getDataPacketFilter());
@ -627,7 +627,7 @@ public class InBandBytestreamSession implements BytestreamSession {
/** /**
* Constructor. * Constructor.
*/ */
public IBBOutputStream() { private IBBOutputStream() {
this.buffer = new byte[byteStreamRequest.getBlockSize()]; this.buffer = new byte[byteStreamRequest.getBlockSize()];
} }

View File

@ -664,14 +664,14 @@ public final class AdHocCommandManager extends Manager {
/** /**
* Stores ad-hoc command information. * Stores ad-hoc command information.
*/ */
private static class AdHocCommandInfo { private static final class AdHocCommandInfo {
private String node; private String node;
private String name; private String name;
private final Jid ownerJID; private final Jid ownerJID;
private LocalCommandFactory factory; private LocalCommandFactory factory;
public AdHocCommandInfo(String node, String name, Jid ownerJID, private AdHocCommandInfo(String node, String name, Jid ownerJID,
LocalCommandFactory factory) LocalCommandFactory factory)
{ {
this.node = node; this.node = node;

View File

@ -29,5 +29,5 @@ public interface FileTransferListener {
* @param request * @param request
* The request from the other user. * The request from the other user.
*/ */
void fileTransferRequest(final FileTransferRequest request); void fileTransferRequest(FileTransferRequest request);
} }

View File

@ -345,12 +345,12 @@ public class JingleS5BTransportSession extends JingleTransportSession<JingleS5BT
return JingleS5BTransportManager.getInstanceFor(jingleSession.getConnection()); return JingleS5BTransportManager.getInstanceFor(jingleSession.getConnection());
} }
private static class UsedCandidate { private static final class UsedCandidate {
private final Socket socket; private final Socket socket;
private final JingleS5BTransport transport; private final JingleS5BTransport transport;
private final JingleS5BTransportCandidate candidate; private final JingleS5BTransportCandidate candidate;
public UsedCandidate(JingleS5BTransport transport, JingleS5BTransportCandidate candidate, Socket socket) { private UsedCandidate(JingleS5BTransport transport, JingleS5BTransportCandidate candidate, Socket socket) {
this.socket = socket; this.socket = socket;
this.transport = transport; this.transport = transport;
this.candidate = candidate; this.candidate = candidate;

View File

@ -45,7 +45,7 @@ public interface InvitationListener {
* @param message the message used by the inviter to send the invitation. * @param message the message used by the inviter to send the invitation.
* @param invitation the raw invitation received with the message. * @param invitation the raw invitation received with the message.
*/ */
public abstract void invitationReceived(XMPPConnection conn, MultiUserChat room, EntityJid inviter, String reason, void invitationReceived(XMPPConnection conn, MultiUserChat room, EntityJid inviter, String reason,
String password, Message message, MUCUser.Invite invitation); String password, Message message, MUCUser.Invite invitation);
} }

View File

@ -38,6 +38,6 @@ public interface InvitationRejectionListener {
* @param message the message used to decline the invitation. * @param message the message used to decline the invitation.
* @param rejection the raw decline found in the message. * @param rejection the raw decline found in the message.
*/ */
public abstract void invitationDeclined(EntityBareJid invitee, String reason, Message message, MUCUser.Decline rejection); void invitationDeclined(EntityBareJid invitee, String reason, Message message, MUCUser.Decline rejection);
} }

View File

@ -37,7 +37,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that has just joined the room * @param participant the participant that has just joined the room
* (e.g. room@conference.jabber.org/nick). * (e.g. room@conference.jabber.org/nick).
*/ */
public abstract void joined(EntityFullJid participant); void joined(EntityFullJid participant);
/** /**
* Called when a room occupant has left the room on its own. This means that the occupant was * Called when a room occupant has left the room on its own. This means that the occupant was
@ -46,7 +46,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that has left the room on its own. * @param participant the participant that has left the room on its own.
* (e.g. room@conference.jabber.org/nick). * (e.g. room@conference.jabber.org/nick).
*/ */
public abstract void left(EntityFullJid participant); void left(EntityFullJid participant);
/** /**
* Called when a room participant has been kicked from the room. This means that the kicked * Called when a room participant has been kicked from the room. This means that the kicked
@ -57,7 +57,7 @@ public interface ParticipantStatusListener {
* @param actor the moderator that kicked the occupant from the room (e.g. user@host.org). * @param actor the moderator that kicked the occupant from the room (e.g. user@host.org).
* @param reason the reason provided by the actor to kick the occupant from the room. * @param reason the reason provided by the actor to kick the occupant from the room.
*/ */
public abstract void kicked(EntityFullJid participant, Jid actor, String reason); void kicked(EntityFullJid participant, Jid actor, String reason);
/** /**
* Called when a moderator grants voice to a visitor. This means that the visitor * Called when a moderator grants voice to a visitor. This means that the visitor
@ -66,7 +66,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that was granted voice in the room * @param participant the participant that was granted voice in the room
* (e.g. room@conference.jabber.org/nick). * (e.g. room@conference.jabber.org/nick).
*/ */
public abstract void voiceGranted(EntityFullJid participant); void voiceGranted(EntityFullJid participant);
/** /**
* Called when a moderator revokes voice from a participant. This means that the participant * Called when a moderator revokes voice from a participant. This means that the participant
@ -76,7 +76,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that was revoked voice from the room * @param participant the participant that was revoked voice from the room
* (e.g. room@conference.jabber.org/nick). * (e.g. room@conference.jabber.org/nick).
*/ */
public abstract void voiceRevoked(EntityFullJid participant); void voiceRevoked(EntityFullJid participant);
/** /**
* Called when an administrator or owner banned a participant from the room. This means that * Called when an administrator or owner banned a participant from the room. This means that
@ -87,7 +87,7 @@ public interface ParticipantStatusListener {
* @param actor the administrator that banned the occupant (e.g. user@host.org). * @param actor the administrator that banned the occupant (e.g. user@host.org).
* @param reason the reason provided by the administrator to ban the occupant. * @param reason the reason provided by the administrator to ban the occupant.
*/ */
public abstract void banned(EntityFullJid participant, Jid actor, String reason); void banned(EntityFullJid participant, Jid actor, String reason);
/** /**
* Called when an administrator grants a user membership to the room. This means that the user * Called when an administrator grants a user membership to the room. This means that the user
@ -96,7 +96,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that was granted membership in the room * @param participant the participant that was granted membership in the room
* (e.g. room@conference.jabber.org/nick). * (e.g. room@conference.jabber.org/nick).
*/ */
public abstract void membershipGranted(EntityFullJid participant); void membershipGranted(EntityFullJid participant);
/** /**
* Called when an administrator revokes a user membership to the room. This means that the * Called when an administrator revokes a user membership to the room. This means that the
@ -105,7 +105,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that was revoked membership from the room * @param participant the participant that was revoked membership from the room
* (e.g. room@conference.jabber.org/nick). * (e.g. room@conference.jabber.org/nick).
*/ */
public abstract void membershipRevoked(EntityFullJid participant); void membershipRevoked(EntityFullJid participant);
/** /**
* Called when an administrator grants moderator privileges to a user. This means that the user * Called when an administrator grants moderator privileges to a user. This means that the user
@ -115,7 +115,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that was granted moderator privileges in the room * @param participant the participant that was granted moderator privileges in the room
* (e.g. room@conference.jabber.org/nick). * (e.g. room@conference.jabber.org/nick).
*/ */
public abstract void moderatorGranted(EntityFullJid participant); void moderatorGranted(EntityFullJid participant);
/** /**
* Called when an administrator revokes moderator privileges from a user. This means that the * Called when an administrator revokes moderator privileges from a user. This means that the
@ -125,7 +125,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that was revoked moderator privileges in the room * @param participant the participant that was revoked moderator privileges in the room
* (e.g. room@conference.jabber.org/nick). * (e.g. room@conference.jabber.org/nick).
*/ */
public abstract void moderatorRevoked(EntityFullJid participant); void moderatorRevoked(EntityFullJid participant);
/** /**
* Called when an owner grants a user ownership on the room. This means that the user * Called when an owner grants a user ownership on the room. This means that the user
@ -135,7 +135,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that was granted ownership on the room * @param participant the participant that was granted ownership on the room
* (e.g. room@conference.jabber.org/nick). * (e.g. room@conference.jabber.org/nick).
*/ */
public abstract void ownershipGranted(EntityFullJid participant); void ownershipGranted(EntityFullJid participant);
/** /**
* Called when an owner revokes a user ownership on the room. This means that the user * Called when an owner revokes a user ownership on the room. This means that the user
@ -145,7 +145,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that was revoked ownership on the room * @param participant the participant that was revoked ownership on the room
* (e.g. room@conference.jabber.org/nick). * (e.g. room@conference.jabber.org/nick).
*/ */
public abstract void ownershipRevoked(EntityFullJid participant); void ownershipRevoked(EntityFullJid participant);
/** /**
* Called when an owner grants administrator privileges to a user. This means that the user * Called when an owner grants administrator privileges to a user. This means that the user
@ -155,7 +155,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that was granted administrator privileges * @param participant the participant that was granted administrator privileges
* (e.g. room@conference.jabber.org/nick). * (e.g. room@conference.jabber.org/nick).
*/ */
public abstract void adminGranted(EntityFullJid participant); void adminGranted(EntityFullJid participant);
/** /**
* Called when an owner revokes administrator privileges from a user. This means that the user * Called when an owner revokes administrator privileges from a user. This means that the user
@ -165,7 +165,7 @@ public interface ParticipantStatusListener {
* @param participant the participant that was revoked administrator privileges * @param participant the participant that was revoked administrator privileges
* (e.g. room@conference.jabber.org/nick). * (e.g. room@conference.jabber.org/nick).
*/ */
public abstract void adminRevoked(EntityFullJid participant); void adminRevoked(EntityFullJid participant);
/** /**
* Called when a participant changed his/her nickname in the room. The new participant's * Called when a participant changed his/her nickname in the room. The new participant's
@ -175,6 +175,6 @@ public interface ParticipantStatusListener {
* (e.g. room@conference.jabber.org/nick). * (e.g. room@conference.jabber.org/nick).
* @param newNickname the new nickname that the participant decided to use. * @param newNickname the new nickname that the participant decided to use.
*/ */
public abstract void nicknameChanged(EntityFullJid participant, Resourcepart newNickname); void nicknameChanged(EntityFullJid participant, Resourcepart newNickname);
} }

View File

@ -32,6 +32,6 @@ public interface SubjectUpdatedListener {
* @param subject the new room's subject. * @param subject the new room's subject.
* @param from the user that changed the room's subject or <code>null</code> if the room itself changed the subject. * @param from the user that changed the room's subject or <code>null</code> if the room itself changed the subject.
*/ */
public abstract void subjectUpdated(String subject, EntityFullJid from); void subjectUpdated(String subject, EntityFullJid from);
} }

View File

@ -34,7 +34,7 @@ public interface UserStatusListener {
* @param actor the moderator that kicked your user from the room (e.g. user@host.org). * @param actor the moderator that kicked your user from the room (e.g. user@host.org).
* @param reason the reason provided by the actor to kick you from the room. * @param reason the reason provided by the actor to kick you from the room.
*/ */
public abstract void kicked(Jid actor, String reason); void kicked(Jid actor, String reason);
/** /**
* Called when a moderator grants voice to your user. This means that you were a visitor in * Called when a moderator grants voice to your user. This means that you were a visitor in
@ -42,7 +42,7 @@ public interface UserStatusListener {
* all occupants. * all occupants.
* *
*/ */
public abstract void voiceGranted(); void voiceGranted();
/** /**
* Called when a moderator revokes voice from your user. This means that you were a * Called when a moderator revokes voice from your user. This means that you were a
@ -50,7 +50,7 @@ public interface UserStatusListener {
* messages to the room occupants. * messages to the room occupants.
* *
*/ */
public abstract void voiceRevoked(); void voiceRevoked();
/** /**
* Called when an administrator or owner banned your user from the room. This means that you * Called when an administrator or owner banned your user from the room. This means that you
@ -59,21 +59,21 @@ public interface UserStatusListener {
* @param actor the administrator that banned your user (e.g. user@host.org). * @param actor the administrator that banned your user (e.g. user@host.org).
* @param reason the reason provided by the administrator to banned you. * @param reason the reason provided by the administrator to banned you.
*/ */
public abstract void banned(Jid actor, String reason); void banned(Jid actor, String reason);
/** /**
* Called when an administrator grants your user membership to the room. This means that you * Called when an administrator grants your user membership to the room. This means that you
* will be able to join the members-only room. * will be able to join the members-only room.
* *
*/ */
public abstract void membershipGranted(); void membershipGranted();
/** /**
* Called when an administrator revokes your user membership to the room. This means that you * Called when an administrator revokes your user membership to the room. This means that you
* will not be able to join the members-only room. * will not be able to join the members-only room.
* *
*/ */
public abstract void membershipRevoked(); void membershipRevoked();
/** /**
* Called when an administrator grants moderator privileges to your user. This means that you * Called when an administrator grants moderator privileges to your user. This means that you
@ -81,7 +81,7 @@ public interface UserStatusListener {
* subject plus all the partcipants privileges. * subject plus all the partcipants privileges.
* *
*/ */
public abstract void moderatorGranted(); void moderatorGranted();
/** /**
* Called when an administrator revokes moderator privileges from your user. This means that * Called when an administrator revokes moderator privileges from your user. This means that
@ -89,7 +89,7 @@ public interface UserStatusListener {
* modify room's subject plus all the partcipants privileges. * modify room's subject plus all the partcipants privileges.
* *
*/ */
public abstract void moderatorRevoked(); void moderatorRevoked();
/** /**
* Called when an owner grants to your user ownership on the room. This means that you * Called when an owner grants to your user ownership on the room. This means that you
@ -97,7 +97,7 @@ public interface UserStatusListener {
* functions. * functions.
* *
*/ */
public abstract void ownershipGranted(); void ownershipGranted();
/** /**
* Called when an owner revokes from your user ownership on the room. This means that you * Called when an owner revokes from your user ownership on the room. This means that you
@ -105,7 +105,7 @@ public interface UserStatusListener {
* administrative functions. * administrative functions.
* *
*/ */
public abstract void ownershipRevoked(); void ownershipRevoked();
/** /**
* Called when an owner grants administrator privileges to your user. This means that you * Called when an owner grants administrator privileges to your user. This means that you
@ -113,7 +113,7 @@ public interface UserStatusListener {
* list. * list.
* *
*/ */
public abstract void adminGranted(); void adminGranted();
/** /**
* Called when an owner revokes administrator privileges from your user. This means that you * Called when an owner revokes administrator privileges from your user. This means that you
@ -121,7 +121,7 @@ public interface UserStatusListener {
* moderator list. * moderator list.
* *
*/ */
public abstract void adminRevoked(); void adminRevoked();
/** /**
* Called when the room is destroyed. * Called when the room is destroyed.
@ -129,6 +129,6 @@ public interface UserStatusListener {
* @param alternateMUC an alternate MultiUserChat, may be null. * @param alternateMUC an alternate MultiUserChat, may be null.
* @param reason the reason why the room was closed, may be null. * @param reason the reason why the room was closed, may be null.
*/ */
public abstract void roomDestroyed(MultiUserChat alternateMUC, String reason); void roomDestroyed(MultiUserChat alternateMUC, String reason);
} }

View File

@ -43,7 +43,7 @@ class SimpleUserSearch extends IQ {
private Form form; private Form form;
private ReportedData data; private ReportedData data;
public SimpleUserSearch() { SimpleUserSearch() {
super(ELEMENT, NAMESPACE); super(ELEMENT, NAMESPACE);
} }

View File

@ -352,11 +352,11 @@ public class ChatConnectionTest {
private Chat newChat; private Chat newChat;
private ChatMessageListener listener; private ChatMessageListener listener;
public TestChatManagerListener(TestMessageListener msgListener) { TestChatManagerListener(TestMessageListener msgListener) {
listener = msgListener; listener = msgListener;
} }
public TestChatManagerListener() { TestChatManagerListener() {
} }
@Override @Override

View File

@ -657,7 +657,7 @@ public class RosterTest extends InitSmackIm {
* *
* @param updateRequest the request which would be sent to the server. * @param updateRequest the request which would be sent to the server.
*/ */
abstract void verifyUpdateRequest(final RosterPacket updateRequest); abstract void verifyUpdateRequest(RosterPacket updateRequest);
@Override @Override
public void run() { public void run() {

View File

@ -148,13 +148,13 @@ public class SubscriptionPreApprovalTest extends InitSmackIm {
* *
* @param updateRequest the request which would be sent to the server. * @param updateRequest the request which would be sent to the server.
*/ */
abstract void verifyRosterUpdateRequest(final RosterPacket updateRequest); abstract void verifyRosterUpdateRequest(RosterPacket updateRequest);
/** /**
* Overwrite this method to check if received pre-approval request is valid * Overwrite this method to check if received pre-approval request is valid
* *
* @param preApproval the request which would be sent to server. * @param preApproval the request which would be sent to server.
*/ */
abstract void verifyPreApprovalRequest(final Presence preApproval); abstract void verifyPreApprovalRequest(Presence preApproval);
@Override @Override
public void run() { public void run() {

View File

@ -62,6 +62,6 @@ public abstract class AbstractSmackLowLevelIntegrationTest extends AbstractSmack
} }
public interface ConnectionCallback { public interface ConnectionCallback {
public void connectionCallback(XMPPTCPConnection connection) throws Exception; void connectionCallback(XMPPTCPConnection connection) throws Exception;
} }
} }

View File

@ -75,8 +75,8 @@ public abstract class JingleMediaManager {
* @param local * @param local
* @return the media session * @return the media session
*/ */
public abstract JingleMediaSession createMediaSession(PayloadType payloadType, final TransportCandidate remote, public abstract JingleMediaSession createMediaSession(PayloadType payloadType, TransportCandidate remote,
final TransportCandidate local, JingleSession jingleSession); TransportCandidate local, JingleSession jingleSession);
// This is to set the attributes of the <content> element of the Jingle packet. // This is to set the attributes of the <content> element of the Jingle packet.
public String getName() { public String getName() {

View File

@ -83,7 +83,7 @@ public class HttpServer {
OutputStream output; OutputStream output;
BufferedReader br; BufferedReader br;
public HttpRequestHandler(Socket socket) throws Exception { HttpRequestHandler(Socket socket) throws Exception {
this.socket = socket; this.socket = socket;
this.input = socket.getInputStream(); this.input = socket.getInputStream();
this.output = socket.getOutputStream(); this.output = socket.getOutputStream();

View File

@ -82,7 +82,7 @@ public abstract class JingleTransportProvider extends ExtensionElementProvider<J
return trans; return trans;
} }
protected abstract JingleTransportCandidate parseCandidate(final XmlPullParser parser); protected abstract JingleTransportCandidate parseCandidate(XmlPullParser parser);
/** /**
* RTP-ICE profile. * RTP-ICE profile.

View File

@ -133,7 +133,7 @@ public class RoomTransfer implements ExtensionElement {
/** /**
* Type of entity being invited to a groupchat support session. * Type of entity being invited to a groupchat support session.
*/ */
public static enum Type { public enum Type {
/** /**
* A user is being invited to a groupchat support session. The user could be another agent * A user is being invited to a groupchat support session. The user could be another agent
* or just a regular XMPP user. * or just a regular XMPP user.

View File

@ -564,12 +564,12 @@ public class Workgroup {
/** /**
* IQ stanza(/packet) to request joining the workgroup queue. * IQ stanza(/packet) to request joining the workgroup queue.
*/ */
private class JoinQueuePacket extends IQ { private final class JoinQueuePacket extends IQ {
private final Jid userID; private final Jid userID;
private final DataForm form; private final DataForm form;
public JoinQueuePacket(Jid workgroup, Form answerForm, Jid userID) { private JoinQueuePacket(Jid workgroup, Form answerForm, Jid userID) {
super("join-queue", "http://jabber.org/protocol/workgroup"); super("join-queue", "http://jabber.org/protocol/workgroup");
this.userID = userID; this.userID = userID;

View File

@ -1280,7 +1280,7 @@ public abstract class OmemoService<T_IdKeyPair, T_IdKey, T_PreKey, T_SigPreKey,
private final OmemoService<T_IdKeyPair, T_IdKey, T_PreKey, T_SigPreKey, T_Sess, T_Addr, T_ECPub, T_Bundle, T_Ciph> service; private final OmemoService<T_IdKeyPair, T_IdKey, T_PreKey, T_SigPreKey, T_Sess, T_Addr, T_ECPub, T_Bundle, T_Ciph> service;
private final StanzaFilter filter; private final StanzaFilter filter;
public OmemoCarbonCopyListener(OmemoManager omemoManager, OmemoCarbonCopyListener(OmemoManager omemoManager,
OmemoService<T_IdKeyPair, T_IdKey, T_PreKey, T_SigPreKey, T_Sess, T_Addr, T_ECPub, T_Bundle, T_Ciph> service, OmemoService<T_IdKeyPair, T_IdKey, T_PreKey, T_SigPreKey, T_Sess, T_Addr, T_ECPub, T_Bundle, T_Ciph> service,
StanzaFilter filter) { StanzaFilter filter) {
this.omemoManager = omemoManager; this.omemoManager = omemoManager;

View File

@ -254,7 +254,7 @@ public class StreamManagement {
private final long handledCount; private final long handledCount;
private final String previd; private final String previd;
public AbstractResume(long handledCount, String previd) { private AbstractResume(long handledCount, String previd) {
this.handledCount = handledCount; this.handledCount = handledCount;
this.previd = previd; this.previd = previd;
} }