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

Enable ModifierOrder checkstyle check

Fixes SMACK-812
This commit is contained in:
Florian Schmaus 2018-03-29 12:35:11 +02:00
parent bd08f11c4a
commit a9ca1a0989
59 changed files with 134 additions and 133 deletions

View file

@ -104,7 +104,7 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
/**
* Counter to uniquely identify connections that are created.
*/
private final static AtomicInteger connectionCounter = new AtomicInteger(0);
private static final AtomicInteger connectionCounter = new AtomicInteger(0);
static {
// Ensure the SmackConfiguration class is loaded by calling a method in it.

View file

@ -502,7 +502,7 @@ public abstract class ConnectionConfiguration {
* @param <B> the builder type parameter.
* @param <C> the resulting connection configuration type parameter.
*/
public static abstract class Builder<B extends Builder<B, C>, C extends ConnectionConfiguration> {
public abstract static class Builder<B extends Builder<B, C>, C extends ConnectionConfiguration> {
private SecurityMode securityMode = SecurityMode.ifpossible;
private DnssecMode dnssecMode = DnssecMode.disabled;
private String keystorePath = System.getProperty("javax.net.ssl.keyStore");

View file

@ -56,7 +56,7 @@ public final class SmackConfiguration {
static Set<String> disabledSmackClasses = new HashSet<>();
final static List<XMPPInputOutputStream> compressionHandlers = new ArrayList<>(2);
static final List<XMPPInputOutputStream> compressionHandlers = new ArrayList<>(2);
static boolean smackInitialized = false;

View file

@ -195,7 +195,7 @@ public class SmackException extends Exception {
}
}
public static abstract class SecurityRequiredException extends SmackException {
public abstract static class SecurityRequiredException extends SmackException {
/**
*

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2017 Florian Schmaus
* Copyright 2017-2018 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -46,7 +46,7 @@ public abstract class SmackFuture<V, E extends Exception> implements Future<V>,
private ExceptionCallback<E> exceptionCallback;
@Override
public synchronized final boolean cancel(boolean mayInterruptIfRunning) {
public final synchronized boolean cancel(boolean mayInterruptIfRunning) {
if (isDone()) {
return false;
}
@ -61,12 +61,12 @@ public abstract class SmackFuture<V, E extends Exception> implements Future<V>,
}
@Override
public synchronized final boolean isCancelled() {
public final synchronized boolean isCancelled() {
return cancelled;
}
@Override
public synchronized final boolean isDone() {
public final synchronized boolean isDone() {
return result != null;
}
@ -98,7 +98,7 @@ public abstract class SmackFuture<V, E extends Exception> implements Future<V>,
}
@Override
public synchronized final V get() throws InterruptedException, ExecutionException {
public final synchronized V get() throws InterruptedException, ExecutionException {
while (result == null && exception == null && !cancelled) {
wait();
}
@ -106,7 +106,7 @@ public abstract class SmackFuture<V, E extends Exception> implements Future<V>,
return getOrThrowExecutionException();
}
public synchronized final V getOrThrow() throws E, InterruptedException {
public final synchronized V getOrThrow() throws E, InterruptedException {
while (result == null && exception == null && !cancelled) {
wait();
}
@ -124,7 +124,7 @@ public abstract class SmackFuture<V, E extends Exception> implements Future<V>,
}
@Override
public synchronized final V get(long timeout, TimeUnit unit)
public final synchronized V get(long timeout, TimeUnit unit)
throws InterruptedException, ExecutionException, TimeoutException {
final long deadline = System.currentTimeMillis() + unit.toMillis(timeout);
while (result != null && exception != null) {
@ -212,7 +212,7 @@ public abstract class SmackFuture<V, E extends Exception> implements Future<V>,
}
}
public static abstract class InternalProcessStanzaSmackFuture<V, E extends Exception> extends InternalSmackFuture<V, E>
public abstract static class InternalProcessStanzaSmackFuture<V, E extends Exception> extends InternalSmackFuture<V, E>
implements StanzaListener, ExceptionCallback<E> {
/**
@ -228,7 +228,7 @@ public abstract class SmackFuture<V, E extends Exception> implements Future<V>,
protected abstract void handleStanza(Stanza stanza);
@Override
public synchronized final void processException(E exception) {
public final synchronized void processException(E exception) {
if (!isNonFatalException(exception)) {
this.exception = exception;
this.notifyAll();
@ -241,7 +241,7 @@ public abstract class SmackFuture<V, E extends Exception> implements Future<V>,
* Wrapper method for {@link #handleStanza(Stanza)}. Note that this method is <code>synchronized</code>.
*/
@Override
public synchronized final void processStanza(Stanza stanza) {
public final synchronized void processStanza(Stanza stanza) {
handleStanza(stanza);
}
}
@ -252,7 +252,7 @@ public abstract class SmackFuture<V, E extends Exception> implements Future<V>,
*
* @param <V>
*/
public static abstract class SimpleInternalProcessStanzaSmackFuture<V, E extends Exception>
public abstract static class SimpleInternalProcessStanzaSmackFuture<V, E extends Exception>
extends InternalProcessStanzaSmackFuture<V, E> {
@Override
protected boolean isNonFatalException(E exception) {

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2014 Florian Schmaus
* Copyright 2014-2018 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -26,7 +26,7 @@ public class XMPPConnectionRegistry {
/**
* A set of listeners which will be invoked if a new connection is created.
*/
private final static Set<ConnectionCreationListener> connectionEstablishedListeners =
private static final Set<ConnectionCreationListener> connectionEstablishedListeners =
new CopyOnWriteArraySet<>();
/**

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2013-2014 Florian Schmaus
* Copyright 2013-2018 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -41,9 +41,9 @@ import java.util.zip.InflaterInputStream;
* @author Florian Schmaus
*/
public class Java7ZlibInputOutputStream extends XMPPInputOutputStream {
private final static Method method;
private final static boolean supported;
private final static int compressionLevel = Deflater.DEFAULT_COMPRESSION;
private static final Method method;
private static final boolean supported;
private static final int compressionLevel = Deflater.DEFAULT_COMPRESSION;
private static final int SYNC_FLUSH_INT = 2;
private static final int FULL_FLUSH_INT = 3;

View file

@ -30,7 +30,7 @@ import org.jxmpp.jid.Jid;
*/
public final class FromMatchesFilter extends AbstractFromToMatchesFilter {
public final static FromMatchesFilter MATCH_NO_FROM_SET = create(null);
public static final FromMatchesFilter MATCH_NO_FROM_SET = create(null);
/**
* Creates a filter matching on the "from" field. The from address must be the same as the

View file

@ -118,7 +118,7 @@ public class AbstractError {
}
}
public static abstract class Builder<B extends Builder<B>> {
public abstract static class Builder<B extends Builder<B>> {
protected String textNamespace;
protected Map<String, String> descriptiveTexts;
protected List<ExtensionElement> extensions;

View file

@ -1,6 +1,6 @@
/**
*
* Copyright © 2014-2015 Florian Schmaus
* Copyright © 2014-2018 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -31,7 +31,7 @@ public class IntrospectionProvider{
// Unfortunately, we have to create two introspection providers, with the exactly the same code here
public static abstract class IQIntrospectionProvider<I extends IQ> extends IQProvider<I> {
public abstract static class IQIntrospectionProvider<I extends IQ> extends IQProvider<I> {
private final Class<I> elementClass;
protected IQIntrospectionProvider(Class<I> elementClass) {
@ -52,7 +52,7 @@ public class IntrospectionProvider{
}
}
public static abstract class PacketExtensionIntrospectionProvider<PE extends ExtensionElement> extends ExtensionElementProvider<PE> {
public abstract static class PacketExtensionIntrospectionProvider<PE extends ExtensionElement> extends ExtensionElementProvider<PE> {
private final Class<PE> elementClass;
protected PacketExtensionIntrospectionProvider(Class<PE> elementClass) {

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2014 Florian Schmaus
* Copyright 2014-2018 Florian Schmaus
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -149,7 +149,7 @@ public class SaslStreamElements {
public static class Success implements Nonza {
public static final String ELEMENT = "success";
final private String data;
private final String data;
/**
* Construct a new SASL success stream element with optional additional data for the SASL layer.

View file

@ -60,7 +60,7 @@ public class Async {
* If the exception is an instance of {@link RuntimeException}, then it will be re-thrown, otherwise <b>it will be
* simply logged.</b>
*/
public static abstract class ThrowingRunnable implements Runnable {
public abstract static class ThrowingRunnable implements Runnable {
public static final Logger LOGGER = Logger.getLogger(ThrowingRunnable.class.getName());

View file

@ -1,6 +1,6 @@
/**
*
* Copyright 2003-2007 Jive Software, 2016-2017 Florian Schmaus.
* Copyright 2003-2007 Jive Software, 2016-2018 Florian Schmaus.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -224,7 +224,7 @@ public class StringUtils {
* @deprecated use {@link org.jivesoftware.smack.util.SHA1#hex(String)} instead.
*/
@Deprecated
public synchronized static String hash(String data) {
public static synchronized String hash(String data) {
return org.jivesoftware.smack.util.SHA1.hex(data);
}

View file

@ -33,7 +33,7 @@ import org.xmlpull.v1.XmlPullParser;
public class ParsingExceptionTest {
private final static String EXTENSION2 =
private static final String EXTENSION2 =
"<extension2 xmlns='namespace'>" +
"<bar node='testNode'>" +
"<i id='testid1'>" +

View file

@ -27,7 +27,7 @@ import org.jivesoftware.smack.util.ParserUtils;
import org.xmlpull.v1.XmlPullParser;
import org.xmlpull.v1.XmlPullParserException;
final public class TestUtils {
public final class TestUtils {
private TestUtils() {
}