1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-09 10:19:41 +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

@ -271,7 +271,7 @@ public class JingleManager implements JingleSessionListener {
* disabled
* @param enabled indicates if the service will be enabled or disabled
*/
public synchronized static void setServiceEnabled(XMPPConnection connection, boolean enabled) {
public static synchronized void setServiceEnabled(XMPPConnection connection, boolean enabled) {
if (isServiceEnabled(connection) == enabled) {
return;
}

View file

@ -42,7 +42,7 @@ public class JingleSessionStateActive extends JingleSessionState {
* A thread-safe means of getting the one instance of this class.
* @return The singleton instance of this class.
*/
public synchronized static JingleSessionState getInstance() {
public static synchronized JingleSessionState getInstance() {
if (INSTANCE == null) {
INSTANCE = new JingleSessionStateActive();
}

View file

@ -42,7 +42,7 @@ public class JingleSessionStateEnded extends JingleSessionState {
* A thread-safe means of getting the one instance of this class.
* @return The singleton instance of this class.
*/
public synchronized static JingleSessionState getInstance() {
public static synchronized JingleSessionState getInstance() {
if (INSTANCE == null) {
INSTANCE = new JingleSessionStateEnded();
}

View file

@ -42,7 +42,7 @@ public class JingleSessionStatePending extends JingleSessionState {
* A thread-safe means of getting the one instance of this class.
* @return The singleton instance of this class.
*/
public synchronized static JingleSessionState getInstance() {
public static synchronized JingleSessionState getInstance() {
if (INSTANCE == null) {
INSTANCE = new JingleSessionStatePending();
}

View file

@ -53,7 +53,7 @@ public class JingleSessionStateUnknown extends JingleSessionState {
* A thread-safe means of getting the one instance of this class.
* @return The singleton instance of this class.
*/
public synchronized static JingleSessionState getInstance() {
public static synchronized JingleSessionState getInstance() {
if (INSTANCE == null) {
INSTANCE = new JingleSessionStateUnknown();
}

View file

@ -54,7 +54,7 @@ public class ImageTransmitter implements Runnable {
private int maxI;
private int maxJ;
private ImageEncoder encoder;
public final static int KEYFRAME = 10;
public static final int KEYFRAME = 10;
public ImageTransmitter(DatagramSocket socket, InetAddress remoteHost, int remotePort, Rectangle area) {

View file

@ -34,7 +34,7 @@ public class OctTreeQuantizer implements Quantizer {
/**
* The greatest depth the tree is allowed to reach
*/
final static int MAX_LEVEL = 5;
static final int MAX_LEVEL = 5;
/**
* An Octree node.

View file

@ -26,27 +26,27 @@ import java.util.Random;
*/
public class PixelUtils {
public final static int REPLACE = 0;
public final static int NORMAL = 1;
public final static int MIN = 2;
public final static int MAX = 3;
public final static int ADD = 4;
public final static int SUBTRACT = 5;
public final static int DIFFERENCE = 6;
public final static int MULTIPLY = 7;
public final static int HUE = 8;
public final static int SATURATION = 9;
public final static int VALUE = 10;
public final static int COLOR = 11;
public final static int SCREEN = 12;
public final static int AVERAGE = 13;
public final static int OVERLAY = 14;
public final static int CLEAR = 15;
public final static int EXCHANGE = 16;
public final static int DISSOLVE = 17;
public final static int DST_IN = 18;
public final static int ALPHA = 19;
public final static int ALPHA_TO_GRAY = 20;
public static final int REPLACE = 0;
public static final int NORMAL = 1;
public static final int MIN = 2;
public static final int MAX = 3;
public static final int ADD = 4;
public static final int SUBTRACT = 5;
public static final int DIFFERENCE = 6;
public static final int MULTIPLY = 7;
public static final int HUE = 8;
public static final int SATURATION = 9;
public static final int VALUE = 10;
public static final int COLOR = 11;
public static final int SCREEN = 12;
public static final int AVERAGE = 13;
public static final int OVERLAY = 14;
public static final int CLEAR = 15;
public static final int EXCHANGE = 16;
public static final int DISSOLVE = 17;
public static final int DST_IN = 18;
public static final int ALPHA = 19;
public static final int ALPHA_TO_GRAY = 20;
private static Random randomGenerator = new Random();
@ -82,8 +82,8 @@ public class PixelUtils {
return Math.abs(r1 - r2) <= tolerance && Math.abs(g1 - g2) <= tolerance && Math.abs(b1 - b2) <= tolerance;
}
private final static float[] hsb1 = new float[3];//FIXME-not thread safe
private final static float[] hsb2 = new float[3];//FIXME-not thread safe
private static final float[] hsb1 = new float[3];//FIXME-not thread safe
private static final float[] hsb2 = new float[3];//FIXME-not thread safe
// Return rgb1 painted onto rgb2
public static int combinePixels(int rgb1, int rgb2, int op) {

View file

@ -32,7 +32,7 @@ public class QuantizeFilter extends WholeImageFilter {
/**
* Floyd-Steinberg dithering matrix.
*/
protected final static int[] matrix = {
protected static final int[] matrix = {
0, 0, 0,
0, 0, 7,
3, 5, 1,

View file

@ -77,7 +77,7 @@ public class HttpServer {
static class HttpRequestHandler implements Runnable {
final static String CRLF = "\r\n";
static final String CRLF = "\r\n";
Socket socket;
InputStream input;
OutputStream output;

View file

@ -50,7 +50,7 @@ public class STUNResolver extends TransportResolver {
private static final Logger LOGGER = Logger.getLogger(STUNResolver.class.getName());
// The filename where the STUN servers are stored.
public final static String STUNSERVERS_FILENAME = "META-INF/stun-config.xml";
public static final String STUNSERVERS_FILENAME = "META-INF/stun-config.xml";
// Current STUN server we are using
protected STUNService currentServer;

View file

@ -57,7 +57,7 @@ public abstract class TransportNegotiator extends JingleNegotiator {
// The time we give to the candidates check before we accept or decline the
// transport (in milliseconds)
public final static int CANDIDATES_ACCEPT_PERIOD = 4000;
public static final int CANDIDATES_ACCEPT_PERIOD = 4000;
// The session this negotiator belongs to
// private final JingleSession session;

View file

@ -183,7 +183,7 @@ public class JingleTransport implements ExtensionElement {
* @author Alvaro Saurin
* @see TransportCandidate
*/
public static abstract class JingleTransportCandidate {
public abstract static class JingleTransportCandidate {
public static final String NODENAME = "candidate";