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

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

@ -338,7 +338,7 @@ public interface XMPPConnection {
* @param packetListener the stanza(/packet) listener to notify of sent packets.
* @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.
@ -355,7 +355,7 @@ public interface XMPPConnection {
*
* @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
@ -582,7 +582,7 @@ public interface XMPPConnection {
@Deprecated
// TODO: Remove in Smack 4.4.
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;
/**
@ -638,8 +638,8 @@ public interface XMPPConnection {
*/
@Deprecated
// TODO: Remove in Smack 4.4.
void sendIqWithResponseCallback(IQ iqRequest, final StanzaListener callback,
@SuppressWarnings("deprecation") final ExceptionCallback exceptionCallback, long timeout)
void sendIqWithResponseCallback(IQ iqRequest, StanzaListener callback,
@SuppressWarnings("deprecation") ExceptionCallback exceptionCallback, long timeout)
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)
* </ul>
*/
public static enum Type {
public enum Type {
WAIT,
CANCEL,
MODIFY,

View file

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

View file

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

View file

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

View file

@ -92,6 +92,6 @@ public class EventManger<K, R, 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;
}
private final void checkIfDnssecRequestedAndSupported(DnssecMode dnssecMode) {
private void checkIfDnssecRequestedAndSupported(DnssecMode dnssecMode) {
if (dnssecMode != DnssecMode.disabled && !supportsDnssec) {
throw new UnsupportedOperationException("This resolver does not support DNSSEC");
}

View file

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