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

@ -585,7 +585,7 @@ public class TestEvents extends SmackTestCase
}
}
static private LeafNode getPubnode(PubSubManager manager, String id, boolean persistItems, boolean deliverPayload)
private static LeafNode getPubnode(PubSubManager manager, String id, boolean persistItems, boolean deliverPayload)
throws XMPPException
{
ConfigureForm form = new ConfigureForm(FormType.submit);

View file

@ -29,7 +29,7 @@ import org.jivesoftware.smackx.pubsub.PubSubManager;
* @author Robin Collier
*
*/
abstract public class PubSubTestCase extends SmackTestCase
public abstract class PubSubTestCase extends SmackTestCase
{
private PubSubManager[] manager;

View file

@ -57,7 +57,7 @@ public class AMPManager {
* @param connection the connection where the service will be enabled or 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

@ -60,7 +60,7 @@ public final class BookmarkManager {
* exist it is created.
* @throws IllegalArgumentException when the connection is null.
*/
public synchronized static BookmarkManager getBookmarkManager(XMPPConnection connection)
public static synchronized BookmarkManager getBookmarkManager(XMPPConnection connection)
{
BookmarkManager manager = bookmarkManagerMap.get(connection);
if (manager == null) {

View file

@ -139,10 +139,10 @@ public final class InBandBytestreamManager extends Manager implements Bytestream
private static final String SESSION_ID_PREFIX = "jibb_";
/* random generator to create session IDs */
private final static Random randomGenerator = new Random();
private static final Random randomGenerator = new Random();
/* stores one InBandBytestreamManager for each XMPP connection */
private final static Map<XMPPConnection, InBandBytestreamManager> managers = new WeakHashMap<>();
private static final Map<XMPPConnection, InBandBytestreamManager> managers = new WeakHashMap<>();
/*
* assigns a user to a listener that is informed if an In-Band Bytestream request for this user

View file

@ -32,7 +32,7 @@ public class DataPacketExtension implements ExtensionElement {
/**
* The element name of the data stanza(/packet) extension.
*/
public final static String ELEMENT = "data";
public static final String ELEMENT = "data";
/**
* The XMPP namespace of the In-Band Bytestream.

View file

@ -113,10 +113,10 @@ public final class Socks5BytestreamManager extends Manager implements Bytestream
private static final String SESSION_ID_PREFIX = "js5_";
/* random generator to create session IDs */
private final static Random randomGenerator = new Random();
private static final Random randomGenerator = new Random();
/* stores one Socks5BytestreamManager for each XMPP connection */
private final static Map<XMPPConnection, Socks5BytestreamManager> managers = new WeakHashMap<>();
private static final Map<XMPPConnection, Socks5BytestreamManager> managers = new WeakHashMap<>();
/*
* assigns a user to a listener that is informed if a bytestream request for this user is

View file

@ -55,7 +55,7 @@ public final class GeoLocationManager extends Manager {
* @param connection The connection the manager is attached to.
* @return The new or existing manager.
*/
public synchronized static GeoLocationManager getInstanceFor(XMPPConnection connection) {
public static synchronized GeoLocationManager getInstanceFor(XMPPConnection connection) {
GeoLocationManager geoLocationManager = INSTANCES.get(connection);
if (geoLocationManager == null) {
geoLocationManager = new GeoLocationManager(connection);

View file

@ -24,7 +24,7 @@ import org.jivesoftware.smackx.jingle.element.JingleContentTransportInfo;
*/
public abstract class JingleS5BTransportInfo extends JingleContentTransportInfo {
public static abstract class JingleS5BCandidateTransportInfo extends JingleS5BTransportInfo {
public abstract static class JingleS5BCandidateTransportInfo extends JingleS5BTransportInfo {
public static final String ATTR_CID = "cid";
private final String candidateId;

View file

@ -78,7 +78,7 @@ import org.jxmpp.jid.parts.Resourcepart;
* @see <a href="http://xmpp.org/extensions/xep-0045.html">XEP-0045: Multi-User Chat</a>
*/
public final class MultiUserChatManager extends Manager {
private final static String DISCO_NODE = MUCInitialPresence.NAMESPACE + "#rooms";
private static final String DISCO_NODE = MUCInitialPresence.NAMESPACE + "#rooms";
private static final Logger LOGGER = Logger.getLogger(MultiUserChatManager.class.getName());

View file

@ -62,7 +62,7 @@ public class OfflineMessageManager {
private static final Logger LOGGER = Logger.getLogger(OfflineMessageManager.class.getName());
private final static String namespace = "http://jabber.org/protocol/offline";
private static final String namespace = "http://jabber.org/protocol/offline";
private final XMPPConnection connection;

View file

@ -85,7 +85,7 @@ public final class PingManager extends Manager {
* The connection the manager is attached to.
* @return The new or existing manager.
*/
public synchronized static PingManager getInstanceFor(XMPPConnection connection) {
public static synchronized PingManager getInstanceFor(XMPPConnection connection) {
PingManager pingManager = INSTANCES.get(connection);
if (pingManager == null) {
pingManager = new PingManager(connection);

View file

@ -678,7 +678,7 @@ public class ConfigureForm extends Form
return result.toString();
}
static private boolean parseBoolean(String fieldValue)
private static boolean parseBoolean(String fieldValue)
{
return ("1".equals(fieldValue) || "true".equals(fieldValue));
}

View file

@ -44,7 +44,7 @@ import org.jivesoftware.smackx.shim.packet.Header;
import org.jivesoftware.smackx.shim.packet.HeadersExtension;
import org.jivesoftware.smackx.xdata.Form;
abstract public class Node
public abstract class Node
{
protected final PubSubManager pubSubManager;
protected final String id;

View file

@ -16,7 +16,7 @@
*/
package org.jivesoftware.smackx.pubsub;
abstract public class NodeEvent
public abstract class NodeEvent
{
private String nodeId;

View file

@ -209,7 +209,7 @@ public class SubscribeForm extends Form
}
static private boolean parseBoolean(String fieldValue)
private static boolean parseBoolean(String fieldValue)
{
return ("1".equals(fieldValue) || "true".equals(fieldValue));
}

View file

@ -90,7 +90,7 @@ public enum SubscribeOptionFields
return "pubsub#" + toString();
}
static public SubscribeOptionFields valueOfFromElement(String elementName)
public static SubscribeOptionFields valueOfFromElement(String elementName)
{
String portion = elementName.substring(elementName.lastIndexOf('#' + 1));

View file

@ -24,7 +24,7 @@ import java.util.List;
*
* @author Robin Collier
*/
abstract public class SubscriptionEvent extends NodeEvent
public abstract class SubscriptionEvent extends NodeEvent
{
private List<String> subIds = Collections.emptyList();

View file

@ -56,7 +56,7 @@ public final class EntityTimeManager extends Manager {
EntityTimeManager.autoEnable = autoEnable;
}
public synchronized static EntityTimeManager getInstanceFor(XMPPConnection connection) {
public static synchronized EntityTimeManager getInstanceFor(XMPPConnection connection) {
EntityTimeManager entityTimeManager = INSTANCES.get(connection);
if (entityTimeManager == null) {
entityTimeManager = new EntityTimeManager(connection);

View file

@ -101,7 +101,7 @@ public class XHTMLManager {
* @param connection the connection where the service will be enabled or 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

@ -249,8 +249,8 @@ public class VCardTest extends InitExtensions {
assertEquals("kir max", vCard.getField("FN"));
}
private final static String MIME_TYPE = "testtype";
private final static String VCARD_XML = "<vCard xmlns='vcard-temp'><PHOTO><BINVAL>" + getAvatarEncoded()
private static final String MIME_TYPE = "testtype";
private static final String VCARD_XML = "<vCard xmlns='vcard-temp'><PHOTO><BINVAL>" + getAvatarEncoded()
+ "</BINVAL><TYPE>" + MIME_TYPE + "</TYPE></PHOTO></vCard>";
@Test