activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martyntay...@apache.org
Subject [20/52] [partial] activemq-artemis git commit: ARTEMIS-765 Improve Checkstyle
Date Fri, 30 Sep 2016 15:26:20 GMT
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/ResourceLimitSettings.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/ResourceLimitSettings.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/ResourceLimitSettings.java
index 843e090..4e6c418 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/ResourceLimitSettings.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/settings/impl/ResourceLimitSettings.java
@@ -17,13 +17,13 @@
 
 package org.apache.activemq.artemis.core.settings.impl;
 
+import java.io.Serializable;
+
 import org.apache.activemq.artemis.api.core.ActiveMQBuffer;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.core.journal.EncodingSupport;
 import org.apache.activemq.artemis.utils.BufferHelper;
 
-import java.io.Serializable;
-
 public class ResourceLimitSettings implements Serializable, EncodingSupport {
 
    private static final long serialVersionUID = -110638321333856932L;
@@ -158,4 +158,4 @@ public class ResourceLimitSettings implements Serializable, EncodingSupport {
          //              queueNameRegex +
          "]";
    }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/ResourceManager.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/ResourceManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/ResourceManager.java
index 5f4b240..20bdb5b 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/ResourceManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/ResourceManager.java
@@ -16,11 +16,10 @@
  */
 package org.apache.activemq.artemis.core.transaction;
 
+import javax.transaction.xa.Xid;
 import java.util.List;
 import java.util.Map;
 
-import javax.transaction.xa.Xid;
-
 import org.apache.activemq.artemis.core.server.ActiveMQComponent;
 
 public interface ResourceManager extends ActiveMQComponent {
@@ -47,5 +46,4 @@ public interface ResourceManager extends ActiveMQComponent {
 
    List<Xid> getInDoubtTransactions();
 
-
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/Transaction.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/Transaction.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/Transaction.java
index 69ddae6..0ddc2cb 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/Transaction.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/Transaction.java
@@ -16,9 +16,8 @@
  */
 package org.apache.activemq.artemis.core.transaction;
 
-import java.util.List;
-
 import javax.transaction.xa.Xid;
+import java.util.List;
 
 import org.apache.activemq.artemis.api.core.ActiveMQException;
 import org.apache.activemq.artemis.core.server.Queue;
@@ -35,8 +34,10 @@ public interface Transaction {
 
    Object getProtocolData();
 
-   /** Protocol managers can use this field to store any object needed.
-    *  An example would be the Session used by the transaction on openwire */
+   /**
+    * Protocol managers can use this field to store any object needed.
+    * An example would be the Session used by the transaction on openwire
+    */
    void setProtocolData(Object data);
 
    boolean isEffective();
@@ -67,17 +68,21 @@ public interface Transaction {
 
    void addOperation(TransactionOperation sync);
 
-   /** This is an operation that will be called right after the storage is completed.
-    *  addOperation could only happen after paging and replication, while these operations will just be
-    *  about the storage*/
+   /**
+    * This is an operation that will be called right after the storage is completed.
+    * addOperation could only happen after paging and replication, while these operations will just be
+    * about the storage
+    */
    void afterStore(TransactionOperation sync);
 
    List<TransactionOperation> getAllOperations();
 
    boolean hasTimedOut(long currentTime, int defaultTimeout);
 
-   /** To validate if the Transaction had previously timed out.
-    *  This is to check the reason why a TX has been rolled back. */
+   /**
+    * To validate if the Transaction had previously timed out.
+    * This is to check the reason why a TX has been rolled back.
+    */
    boolean hasTimedOut();
 
    void putProperty(int index, Object property);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/TransactionDetail.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/TransactionDetail.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/TransactionDetail.java
index 73b6bb3..efe4cf9 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/TransactionDetail.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/TransactionDetail.java
@@ -16,15 +16,14 @@
  */
 package org.apache.activemq.artemis.core.transaction;
 
-import java.text.DateFormat;
-import java.util.Date;
-import java.util.List;
-import java.util.Map;
-
 import javax.json.JsonArrayBuilder;
 import javax.json.JsonObject;
 import javax.json.JsonObjectBuilder;
 import javax.transaction.xa.Xid;
+import java.text.DateFormat;
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
 
 import org.apache.activemq.artemis.api.core.JsonUtil;
 import org.apache.activemq.artemis.core.server.MessageReference;
@@ -66,12 +65,7 @@ public abstract class TransactionDetail {
 
    public JsonObject toJSON() throws Exception {
       DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM);
-      JsonObjectBuilder detailJson = JsonLoader.createObjectBuilder()
-         .add(KEY_CREATION_TIME, dateFormat.format(new Date(this.creationTime)))
-         .add(KEY_XID_AS_BASE64, XidImpl.toBase64String(this.xid))
-         .add(KEY_XID_FORMAT_ID, this.xid.getFormatId())
-         .add(KEY_XID_GLOBAL_TXID, new String(this.xid.getGlobalTransactionId()))
-         .add(KEY_XID_BRANCH_QUAL, new String(this.xid.getBranchQualifier()));
+      JsonObjectBuilder detailJson = JsonLoader.createObjectBuilder().add(KEY_CREATION_TIME, dateFormat.format(new Date(this.creationTime))).add(KEY_XID_AS_BASE64, XidImpl.toBase64String(this.xid)).add(KEY_XID_FORMAT_ID, this.xid.getFormatId()).add(KEY_XID_GLOBAL_TXID, new String(this.xid.getGlobalTransactionId())).add(KEY_XID_BRANCH_QUAL, new String(this.xid.getBranchQualifier()));
 
       JsonArrayBuilder msgsJson = JsonLoader.createArrayBuilder();
 
@@ -89,8 +83,7 @@ public abstract class TransactionDetail {
          String opType = null;
          if (opClassName.equals("org.apache.activemq.artemis.core.postoffice.impl.PostOfficeImpl$AddOperation")) {
             opType = "(+) send";
-         }
-         else if (opClassName.equals("org.apache.activemq.artemis.core.server.impl.QueueImpl$RefsOperation")) {
+         } else if (opClassName.equals("org.apache.activemq.artemis.core.server.impl.QueueImpl$RefsOperation")) {
             opType = "(-) receive";
          }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/CoreTransactionDetail.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/CoreTransactionDetail.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/CoreTransactionDetail.java
index 6683882..4730596 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/CoreTransactionDetail.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/CoreTransactionDetail.java
@@ -16,9 +16,8 @@
  */
 package org.apache.activemq.artemis.core.transaction.impl;
 
-import java.util.Map;
-
 import javax.transaction.xa.Xid;
+import java.util.Map;
 
 import org.apache.activemq.artemis.api.core.Message;
 import org.apache.activemq.artemis.core.server.ServerMessage;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/ResourceManagerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/ResourceManagerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/ResourceManagerImpl.java
index ff41515..3ff73d7 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/ResourceManagerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/ResourceManagerImpl.java
@@ -213,8 +213,7 @@ public class ResourceManagerImpl implements ResourceManager {
          for (Transaction failedTransaction : timedoutTransactions) {
             try {
                failedTransaction.rollback();
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                ActiveMQServerLogger.LOGGER.errorTimingOutTX(e, failedTransaction.getXid());
             }
          }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/TransactionImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/TransactionImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/TransactionImpl.java
index 44e626a..cc2fa22 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/TransactionImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/transaction/impl/TransactionImpl.java
@@ -165,8 +165,7 @@ public class TransactionImpl implements Transaction {
          boolean timedout;
          if (timeoutSeconds == -1) {
             timedout = getState() != Transaction.State.PREPARED && currentTime > createTime + defaultTimeout * 1000;
-         }
-         else {
+         } else {
             timedout = getState() != Transaction.State.PREPARED && currentTime > createTime + timeoutSeconds * 1000;
          }
 
@@ -204,13 +203,11 @@ public class TransactionImpl implements Transaction {
 
                if (exception != null) {
                   throw exception;
-               }
-               else {
+               } else {
                   // Do nothing
                   return;
                }
-            }
-            else if (state != State.ACTIVE) {
+            } else if (state != State.ACTIVE) {
                throw new IllegalStateException("Transaction is in invalid state " + state);
             }
 
@@ -239,8 +236,7 @@ public class TransactionImpl implements Transaction {
                }
             });
          }
-      }
-      finally {
+      } finally {
          storageManager.readUnLock();
       }
    }
@@ -266,8 +262,7 @@ public class TransactionImpl implements Transaction {
 
             if (exception != null) {
                throw exception;
-            }
-            else {
+            } else {
                // Do nothing
                return;
             }
@@ -277,8 +272,7 @@ public class TransactionImpl implements Transaction {
             if (onePhase && state != State.ACTIVE || !onePhase && state != State.PREPARED) {
                throw new ActiveMQIllegalStateException("Transaction is in invalid state " + state);
             }
-         }
-         else {
+         } else {
             if (state != State.ACTIVE) {
                throw new ActiveMQIllegalStateException("Transaction is in invalid state " + state);
             }
@@ -361,8 +355,7 @@ public class TransactionImpl implements Transaction {
             if (state != State.PREPARED && state != State.ACTIVE && state != State.ROLLBACK_ONLY) {
                throw new ActiveMQIllegalStateException("Transaction is in invalid state " + state);
             }
-         }
-         else {
+         } else {
             if (state != State.ACTIVE && state != State.ROLLBACK_ONLY) {
                throw new ActiveMQIllegalStateException("Transaction is in invalid state " + state);
             }
@@ -382,8 +375,7 @@ public class TransactionImpl implements Transaction {
       try {
          doRollback();
          state = State.ROLLEDBACK;
-      }
-      catch (IllegalStateException e) {
+      } catch (IllegalStateException e) {
          // Something happened before and the TX didn't make to the Journal / Storage
          // We will like to execute afterRollback and clear anything pending
          ActiveMQServerLogger.LOGGER.warn(e);
@@ -491,7 +483,6 @@ public class TransactionImpl implements Transaction {
       operations.add(operation);
    }
 
-
    @Override
    public synchronized void afterStore(TransactionOperation sync) {
       if (storeOperations == null) {
@@ -511,8 +502,7 @@ public class TransactionImpl implements Transaction {
 
       if (operations != null) {
          return new ArrayList<>(operations);
-      }
-      else {
+      } else {
          return new ArrayList<>();
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractProtocolManager.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractProtocolManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractProtocolManager.java
index ddefe86..6ce2518 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractProtocolManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractProtocolManager.java
@@ -19,25 +19,21 @@
 
 package org.apache.activemq.artemis.spi.core.protocol;
 
+import java.util.List;
+
 import org.apache.activemq.artemis.api.core.BaseInterceptor;
 import org.apache.activemq.artemis.core.server.ActiveMQServerLogger;
 
-import java.util.List;
+public abstract class AbstractProtocolManager<P, I extends BaseInterceptor<P>, C extends RemotingConnection> implements ProtocolManager<I> {
 
-public abstract class AbstractProtocolManager<P, I extends BaseInterceptor<P>, C extends RemotingConnection>
-      implements ProtocolManager<I> {
-
-   protected void invokeInterceptors(final List<I> interceptors,
-                                     final P message,
-                                     final C connection) {
+   protected void invokeInterceptors(final List<I> interceptors, final P message, final C connection) {
       if (interceptors != null && !interceptors.isEmpty()) {
          for (I interceptor : interceptors) {
             try {
                if (!interceptor.intercept(message, connection)) {
                   break;
                }
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                ActiveMQServerLogger.LOGGER.error(e);
             }
          }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractProtocolManagerFactory.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractProtocolManagerFactory.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractProtocolManagerFactory.java
index fcca774..10fb249 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractProtocolManagerFactory.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/AbstractProtocolManagerFactory.java
@@ -37,8 +37,7 @@ public abstract class AbstractProtocolManagerFactory<P extends BaseInterceptor>
    protected List<P> internalFilterInterceptors(Class<P> type, List<? extends BaseInterceptor> listIn) {
       if (listIn == null) {
          return Collections.emptyList();
-      }
-      else {
+      } else {
          CopyOnWriteArrayList<P> listOut = new CopyOnWriteArrayList<>();
          for (BaseInterceptor<?> in : listIn) {
             if (type.isInstance(in)) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/ProtocolManager.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/ProtocolManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/ProtocolManager.java
index 3d5be39..a7e50d5 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/ProtocolManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/ProtocolManager.java
@@ -55,9 +55,11 @@ public interface ProtocolManager<P extends BaseInterceptor> {
     */
    MessageConverter getConverter();
 
-   /** If this protocols accepts connectoins without an initial handshake.
-    *  If true this protocol will be the failback case no other connections are made.
-    *  New designed protocols should always require a handshake. This is only useful for legacy protocols. */
+   /**
+    * If this protocols accepts connectoins without an initial handshake.
+    * If true this protocol will be the failback case no other connections are made.
+    * New designed protocols should always require a handshake. This is only useful for legacy protocols.
+    */
    boolean acceptsNoHandshake();
 
    void handshake(NettyServerConnection connection, ActiveMQBuffer buffer);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/SessionCallback.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/SessionCallback.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/SessionCallback.java
index 9f23f80..891f1ad 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/SessionCallback.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/protocol/SessionCallback.java
@@ -29,13 +29,16 @@ public interface SessionCallback {
     */
    boolean hasCredits(ServerConsumer consumerID);
 
-   /** This can be used to complete certain operations outside of the lock,
-    *  like acks or other operations. */
+   /**
+    * This can be used to complete certain operations outside of the lock,
+    * like acks or other operations.
+    */
    void afterDelivery() throws Exception;
 
    /**
     * Use this to updates specifics on the message after a redelivery happened.
     * Return true if there was specific logic applied on the protocol, so the ServerConsumer won't make any adjustments.
+    *
     * @param consumer
     * @param ref
     * @param failed
@@ -54,7 +57,11 @@ public interface SessionCallback {
    //       Future developments may change this, but beware why I have chosen to keep the parameter separated here
    int sendMessage(MessageReference ref, ServerMessage message, ServerConsumer consumerID, int deliveryCount);
 
-   int sendLargeMessage(MessageReference reference, ServerMessage message, ServerConsumer consumerID, long bodySize, int deliveryCount);
+   int sendLargeMessage(MessageReference reference,
+                        ServerMessage message,
+                        ServerConsumer consumerID,
+                        long bodySize,
+                        int deliveryCount);
 
    int sendLargeMessageContinuation(ServerConsumer consumerID,
                                     byte[] body,
@@ -67,6 +74,8 @@ public interface SessionCallback {
 
    boolean isWritable(ReadyListener callback);
 
-   /** Some protocols (Openwire) needs a special message with the browser is finished. */
+   /**
+    * Some protocols (Openwire) needs a special message with the browser is finished.
+    */
    void browserFinished(ServerConsumer consumer);
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/Acceptor.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/Acceptor.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/Acceptor.java
index c0da381..2468c81 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/Acceptor.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/Acceptor.java
@@ -31,8 +31,10 @@ import org.apache.activemq.artemis.core.server.management.NotificationService;
  */
 public interface Acceptor extends ActiveMQComponent {
 
-   /** The name of the acceptor used on the configuration.
-    *  for logging and debug purposes. */
+   /**
+    * The name of the acceptor used on the configuration.
+    * for logging and debug purposes.
+    */
    String getName();
 
    /**
@@ -42,8 +44,8 @@ public interface Acceptor extends ActiveMQComponent {
 
    /**
     * This will update the list of interceptors for each ProtocolManager inside the acceptor.
-    * */
-   void updateInterceptors(List<BaseInterceptor> incomingInterceptors,  List<BaseInterceptor> outgoingInterceptors);
+    */
+   void updateInterceptors(List<BaseInterceptor> incomingInterceptors, List<BaseInterceptor> outgoingInterceptors);
 
    /**
     * @return the cluster connection associated with this Acceptor

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ServerConnectionLifeCycleListener.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ServerConnectionLifeCycleListener.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ServerConnectionLifeCycleListener.java
index 7e3c8fd..4668d0d 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ServerConnectionLifeCycleListener.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/remoting/ServerConnectionLifeCycleListener.java
@@ -19,4 +19,5 @@ package org.apache.activemq.artemis.spi.core.remoting;
 import org.apache.activemq.artemis.spi.core.protocol.ProtocolManager;
 
 public interface ServerConnectionLifeCycleListener extends BaseConnectionLifeCycleListener<ProtocolManager> {
+
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQJAASSecurityManager.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQJAASSecurityManager.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQJAASSecurityManager.java
index 943851e..26c88b2 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQJAASSecurityManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQJAASSecurityManager.java
@@ -73,7 +73,10 @@ public class ActiveMQJAASSecurityManager implements ActiveMQSecurityManager3 {
       this.configuration = configuration;
    }
 
-   public ActiveMQJAASSecurityManager(String configurationName, String certificateConfigurationName, SecurityConfiguration configuration, SecurityConfiguration certificateConfiguration) {
+   public ActiveMQJAASSecurityManager(String configurationName,
+                                      String certificateConfigurationName,
+                                      SecurityConfiguration configuration,
+                                      SecurityConfiguration certificateConfiguration) {
       this.configurationName = configurationName;
       this.configuration = configuration;
       this.certificateConfigurationName = certificateConfigurationName;
@@ -89,8 +92,7 @@ public class ActiveMQJAASSecurityManager implements ActiveMQSecurityManager3 {
    public String validateUser(final String user, final String password, X509Certificate[] certificates) {
       try {
          return getUserFromSubject(getAuthenticatedSubject(user, password, certificates));
-      }
-      catch (LoginException e) {
+      } catch (LoginException e) {
          if (logger.isDebugEnabled()) {
             logger.debug("Couldn't validate user", e);
          }
@@ -116,11 +118,11 @@ public class ActiveMQJAASSecurityManager implements ActiveMQSecurityManager3 {
 
    @Override
    public String validateUserAndRole(final String user,
-                                      final String password,
-                                      final Set<Role> roles,
-                                      final CheckType checkType,
-                                      final String address,
-                                      final RemotingConnection connection) {
+                                     final String password,
+                                     final Set<Role> roles,
+                                     final CheckType checkType,
+                                     final String address,
+                                     final RemotingConnection connection) {
       X509Certificate[] certificates = null;
       if (connection != null && connection.getTransportConnection() instanceof NettyConnection) {
          certificates = CertificateUtil.getCertsFromChannel(((NettyConnection) connection.getTransportConnection()).getChannel());
@@ -128,8 +130,7 @@ public class ActiveMQJAASSecurityManager implements ActiveMQSecurityManager3 {
       Subject localSubject;
       try {
          localSubject = getAuthenticatedSubject(user, password, certificates);
-      }
-      catch (LoginException e) {
+      } catch (LoginException e) {
          if (logger.isDebugEnabled()) {
             logger.debug("Couldn't validate user", e);
          }
@@ -145,8 +146,7 @@ public class ActiveMQJAASSecurityManager implements ActiveMQSecurityManager3 {
          Set<Principal> rolesForSubject = new HashSet<>();
          try {
             rolesForSubject.addAll(localSubject.getPrincipals(Class.forName(rolePrincipalClass).asSubclass(Principal.class)));
-         }
-         catch (Exception e) {
+         } catch (Exception e) {
             logger.info("Can't find roles for the subject", e);
          }
          if (rolesForSubject.size() > 0 && rolesWithPermission.size() > 0) {
@@ -168,18 +168,18 @@ public class ActiveMQJAASSecurityManager implements ActiveMQSecurityManager3 {
 
       if (authorized) {
          return getUserFromSubject(localSubject);
-      }
-      else {
+      } else {
          return null;
       }
    }
 
-   private Subject getAuthenticatedSubject(final String user, final String password, final X509Certificate[] certificates) throws LoginException {
+   private Subject getAuthenticatedSubject(final String user,
+                                           final String password,
+                                           final X509Certificate[] certificates) throws LoginException {
       LoginContext lc;
       if (certificateConfigurationName != null && certificateConfigurationName.length() > 0 && certificates != null) {
          lc = new LoginContext(certificateConfigurationName, null, new JaasCallbackHandler(user, password, certificates), certificateConfiguration);
-      }
-      else {
+      } else {
          lc = new LoginContext(configurationName, null, new JaasCallbackHandler(user, password, certificates), configuration);
       }
       lc.login();
@@ -192,8 +192,7 @@ public class ActiveMQJAASSecurityManager implements ActiveMQSecurityManager3 {
          if (checkType.hasRole(role)) {
             try {
                principals.add(createGroupPrincipal(role.getName(), rolePrincipalClass));
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                logger.info("Can't add role principal", e);
             }
          }
@@ -276,8 +275,7 @@ public class ActiveMQJAASSecurityManager implements ActiveMQSecurityManager3 {
       }
       if (i < constructors.length) {
          instance = constructors[i].newInstance(param);
-      }
-      else {
+      } else {
          instance = cls.newInstance();
          Method[] methods = cls.getMethods();
          i = 0;
@@ -290,8 +288,7 @@ public class ActiveMQJAASSecurityManager implements ActiveMQSecurityManager3 {
 
          if (i < methods.length) {
             methods[i].invoke(instance, param);
-         }
-         else {
+         } else {
             throw new NoSuchMethodException();
          }
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQSecurityManager2.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQSecurityManager2.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQSecurityManager2.java
index e44a785..fa340e0 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQSecurityManager2.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQSecurityManager2.java
@@ -52,13 +52,18 @@ public interface ActiveMQSecurityManager2 extends ActiveMQSecurityManager {
     * This method is called instead of
     * {@link ActiveMQSecurityManager#validateUserAndRole(String, String, Set, CheckType)}.
     *
-    * @param user      the user
-    * @param password  the user's password
-    * @param roles     the user's roles
-    * @param checkType which permission to validate
-    * @param address   the address for which to perform authorization
-    * @param connection   the user's connection
+    * @param user       the user
+    * @param password   the user's password
+    * @param roles      the user's roles
+    * @param checkType  which permission to validate
+    * @param address    the address for which to perform authorization
+    * @param connection the user's connection
     * @return true if the user is valid and they have the correct roles for the given destination address
     */
-   boolean validateUserAndRole(String user, String password, Set<Role> roles, CheckType checkType, String address, RemotingConnection connection);
+   boolean validateUserAndRole(String user,
+                               String password,
+                               Set<Role> roles,
+                               CheckType checkType,
+                               String address,
+                               RemotingConnection connection);
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQSecurityManager3.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQSecurityManager3.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQSecurityManager3.java
index 192f5dd..d565da4 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQSecurityManager3.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQSecurityManager3.java
@@ -52,13 +52,18 @@ public interface ActiveMQSecurityManager3 extends ActiveMQSecurityManager {
     * This method is called instead of
     * {@link ActiveMQSecurityManager#validateUserAndRole(String, String, Set, CheckType)}.
     *
-    * @param user      the user
-    * @param password  the user's password
-    * @param roles     the user's roles
-    * @param checkType which permission to validate
-    * @param address   the address for which to perform authorization
-    * @param connection   the user's connection
+    * @param user       the user
+    * @param password   the user's password
+    * @param roles      the user's roles
+    * @param checkType  which permission to validate
+    * @param address    the address for which to perform authorization
+    * @param connection the user's connection
     * @return the name of the validated user or null if the user isn't validated
     */
-   String validateUserAndRole(String user, String password, Set<Role> roles, CheckType checkType, String address, RemotingConnection connection);
+   String validateUserAndRole(String user,
+                              String password,
+                              Set<Role> roles,
+                              CheckType checkType,
+                              String address,
+                              RemotingConnection connection);
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQSecurityManagerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQSecurityManagerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQSecurityManagerImpl.java
index def688f..4aff8e2 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQSecurityManagerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/ActiveMQSecurityManagerImpl.java
@@ -51,11 +51,9 @@ public class ActiveMQSecurityManagerImpl implements ActiveMQSecurityManager {
       if (username != null) {
          User user = configuration.getUser(username);
          return user != null && user.isValid(username, password);
-      }
-      else if (password == null) {
+      } else if (password == null) {
          return configuration.getDefaultUser() != null;
-      }
-      else { // the only possible case here is user == null, password != null
+      } else { // the only possible case here is user == null, password != null
          logger.debug("Validating default user against a provided password.  This happens when username=null, password!=null");
          String defaultUsername = configuration.getDefaultUser();
          User defaultUser = configuration.getUser(defaultUsername);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/CertificateLoginModule.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/CertificateLoginModule.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/CertificateLoginModule.java
index 0037e67..9c10058 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/CertificateLoginModule.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/CertificateLoginModule.java
@@ -52,7 +52,10 @@ public abstract class CertificateLoginModule extends PropertiesLoader implements
     * Overriding to allow for proper initialization. Standard JAAS.
     */
    @Override
-   public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) {
+   public void initialize(Subject subject,
+                          CallbackHandler callbackHandler,
+                          Map<String, ?> sharedState,
+                          Map<String, ?> options) {
       this.subject = subject;
       this.callbackHandler = callbackHandler;
 
@@ -69,11 +72,9 @@ public abstract class CertificateLoginModule extends PropertiesLoader implements
       callbacks[0] = new CertificateCallback();
       try {
          callbackHandler.handle(callbacks);
-      }
-      catch (IOException ioe) {
+      } catch (IOException ioe) {
          throw new LoginException(ioe.getMessage());
-      }
-      catch (UnsupportedCallbackException uce) {
+      } catch (UnsupportedCallbackException uce) {
          throw new LoginException(uce.getMessage() + " Unable to obtain client certificates.");
       }
       certificates = ((CertificateCallback) callbacks[0]).getCertificates();
@@ -168,8 +169,7 @@ public abstract class CertificateLoginModule extends PropertiesLoader implements
    protected String getDistinguishedName(final X509Certificate[] certs) {
       if (certs != null && certs.length > 0 && certs[0] != null) {
          return certs[0].getSubjectDN().getName();
-      }
-      else {
+      } else {
          return null;
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/GuestLoginModule.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/GuestLoginModule.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/GuestLoginModule.java
index 22fdb7e..5907b27 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/GuestLoginModule.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/GuestLoginModule.java
@@ -36,7 +36,6 @@ import org.jboss.logging.Logger;
  *
  * Useful for unauthenticated communication channels being used in the
  * same broker as authenticated ones.
- *
  */
 public class GuestLoginModule implements LoginModule {
 
@@ -55,7 +54,10 @@ public class GuestLoginModule implements LoginModule {
    private boolean loginSucceeded;
 
    @Override
-   public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) {
+   public void initialize(Subject subject,
+                          CallbackHandler callbackHandler,
+                          Map<String, ?> sharedState,
+                          Map<String, ?> options) {
       this.subject = subject;
       this.callbackHandler = callbackHandler;
       debug = "true".equalsIgnoreCase((String) options.get("debug"));
@@ -89,8 +91,7 @@ public class GuestLoginModule implements LoginModule {
                loginSucceeded = false;
                passwordCallback.clearPassword();
             }
-         }
-         catch (IOException | UnsupportedCallbackException e) {
+         } catch (IOException | UnsupportedCallbackException e) {
          }
       }
       if (debug) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/InVMLoginModule.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/InVMLoginModule.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/InVMLoginModule.java
index 9aa656c..f1347fb 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/InVMLoginModule.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/InVMLoginModule.java
@@ -49,7 +49,10 @@ public class InVMLoginModule implements LoginModule {
    private boolean loginSucceeded;
 
    @Override
-   public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) {
+   public void initialize(Subject subject,
+                          CallbackHandler callbackHandler,
+                          Map<String, ?> sharedState,
+                          Map<String, ?> options) {
       this.subject = subject;
       this.callbackHandler = callbackHandler;
       this.configuration = (SecurityConfiguration) options.get(CONFIG_PROP_NAME);
@@ -63,11 +66,9 @@ public class InVMLoginModule implements LoginModule {
       callbacks[1] = new PasswordCallback("Password: ", false);
       try {
          callbackHandler.handle(callbacks);
-      }
-      catch (IOException ioe) {
+      } catch (IOException ioe) {
          throw new LoginException(ioe.getMessage());
-      }
-      catch (UnsupportedCallbackException uce) {
+      } catch (UnsupportedCallbackException uce) {
          throw new LoginException(uce.getMessage() + " not available to obtain information from user");
       }
       user = ((NameCallback) callbacks[0]).getName();
@@ -78,12 +79,10 @@ public class InVMLoginModule implements LoginModule {
       if (user == null) {
          if (configuration.getDefaultUser() == null) {
             throw new FailedLoginException("Both username and defaultUser are null");
-         }
-         else {
+         } else {
             user = configuration.getDefaultUser();
          }
-      }
-      else {
+      } else {
          String password = configuration.getUser(user) == null ? null : configuration.getUser(user).getPassword();
 
          if (password == null) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/JaasCallbackHandler.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/JaasCallbackHandler.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/JaasCallbackHandler.java
index 97beffa..ca4edbe 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/JaasCallbackHandler.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/JaasCallbackHandler.java
@@ -46,26 +46,21 @@ public class JaasCallbackHandler implements CallbackHandler {
             PasswordCallback passwordCallback = (PasswordCallback) callback;
             if (password == null) {
                passwordCallback.setPassword(null);
-            }
-            else {
+            } else {
                passwordCallback.setPassword(password.toCharArray());
             }
-         }
-         else if (callback instanceof NameCallback) {
+         } else if (callback instanceof NameCallback) {
             NameCallback nameCallback = (NameCallback) callback;
             if (username == null) {
                nameCallback.setName(null);
-            }
-            else {
+            } else {
                nameCallback.setName(username);
             }
-         }
-         else if (callback instanceof CertificateCallback) {
+         } else if (callback instanceof CertificateCallback) {
             CertificateCallback certCallback = (CertificateCallback) callback;
 
             certCallback.setCertificates(certificates);
-         }
-         else {
+         } else {
             throw new UnsupportedCallbackException(callback);
          }
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/LDAPLoginModule.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/LDAPLoginModule.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/LDAPLoginModule.java
index df5c7d5..5c2343a 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/LDAPLoginModule.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/LDAPLoginModule.java
@@ -85,7 +85,10 @@ public class LDAPLoginModule implements LoginModule {
    private final Set<RolePrincipal> groups = new HashSet<>();
 
    @Override
-   public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) {
+   public void initialize(Subject subject,
+                          CallbackHandler callbackHandler,
+                          Map<String, ?> sharedState,
+                          Map<String, ?> options) {
       this.subject = subject;
       this.handler = callbackHandler;
 
@@ -101,8 +104,7 @@ public class LDAPLoginModule implements LoginModule {
       callbacks[1] = new PasswordCallback("Password", false);
       try {
          handler.handle(callbacks);
-      }
-      catch (IOException | UnsupportedCallbackException e) {
+      } catch (IOException | UnsupportedCallbackException e) {
          throw (LoginException) new LoginException().initCause(e);
       }
 
@@ -150,8 +152,7 @@ public class LDAPLoginModule implements LoginModule {
          try {
             context.close();
             context = null;
-         }
-         catch (Exception e) {
+         } catch (Exception e) {
             ActiveMQServerLogger.LOGGER.error(e.toString());
          }
       }
@@ -167,8 +168,7 @@ public class LDAPLoginModule implements LoginModule {
       }
       try {
          openContext();
-      }
-      catch (NamingException ne) {
+      } catch (NamingException ne) {
          FailedLoginException ex = new FailedLoginException("Error opening LDAP connection");
          ex.initCause(ne);
          throw ex;
@@ -186,8 +186,7 @@ public class LDAPLoginModule implements LoginModule {
          SearchControls constraints = new SearchControls();
          if (userSearchSubtreeBool) {
             constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
-         }
-         else {
+         } else {
             constraints.setSearchScope(SearchControls.ONELEVEL_SCOPE);
          }
 
@@ -231,8 +230,7 @@ public class LDAPLoginModule implements LoginModule {
             Name name = contextName.addAll(baseName);
             name = name.addAll(entryName);
             dn = name.toString();
-         }
-         else {
+         } else {
             logger.debug("LDAP returned an absolute name: " + result.getName());
 
             try {
@@ -241,12 +239,10 @@ public class LDAPLoginModule implements LoginModule {
 
                if (path.startsWith("/")) {
                   dn = path.substring(1);
-               }
-               else {
+               } else {
                   dn = path;
                }
-            }
-            catch (URISyntaxException e) {
+            } catch (URISyntaxException e) {
                closeContext();
                FailedLoginException ex = new FailedLoginException("Error parsing absolute name as URI.");
                ex.initCause(e);
@@ -277,18 +273,15 @@ public class LDAPLoginModule implements LoginModule {
             for (String role : roles) {
                groups.add(new RolePrincipal(role));
             }
-         }
-         else {
+         } else {
             throw new FailedLoginException("Password does not match for user: " + username);
          }
-      }
-      catch (CommunicationException e) {
+      } catch (CommunicationException e) {
          closeContext();
          FailedLoginException ex = new FailedLoginException("Error contacting LDAP");
          ex.initCause(e);
          throw ex;
-      }
-      catch (NamingException e) {
+      } catch (NamingException e) {
          closeContext();
          FailedLoginException ex = new FailedLoginException("Error contacting LDAP");
          ex.initCause(e);
@@ -321,8 +314,7 @@ public class LDAPLoginModule implements LoginModule {
       SearchControls constraints = new SearchControls();
       if (roleSearchSubtreeBool) {
          constraints.setSearchScope(SearchControls.SUBTREE_SCOPE);
-      }
-      else {
+      } else {
          constraints.setSearchScope(SearchControls.ONELEVEL_SCOPE);
       }
       if (logger.isDebugEnabled()) {
@@ -409,8 +401,7 @@ public class LDAPLoginModule implements LoginModule {
          if (logger.isDebugEnabled()) {
             logger.debug("User " + dn + " successfully bound.");
          }
-      }
-      catch (AuthenticationException e) {
+      } catch (AuthenticationException e) {
          isValid = false;
          if (logger.isDebugEnabled()) {
             logger.debug("Authentication failed for dn=" + dn);
@@ -419,14 +410,12 @@ public class LDAPLoginModule implements LoginModule {
 
       if (isLoginPropertySet(CONNECTION_USERNAME)) {
          context.addToEnvironment(Context.SECURITY_PRINCIPAL, getLDAPPropertyValue(CONNECTION_USERNAME));
-      }
-      else {
+      } else {
          context.removeFromEnvironment(Context.SECURITY_PRINCIPAL);
       }
       if (isLoginPropertySet(CONNECTION_PASSWORD)) {
          context.addToEnvironment(Context.SECURITY_CREDENTIALS, getLDAPPropertyValue(CONNECTION_PASSWORD));
-      }
-      else {
+      } else {
          context.removeFromEnvironment(Context.SECURITY_CREDENTIALS);
       }
 
@@ -462,15 +451,13 @@ public class LDAPLoginModule implements LoginModule {
             env.put(Context.INITIAL_CONTEXT_FACTORY, getLDAPPropertyValue(INITIAL_CONTEXT_FACTORY));
             if (isLoginPropertySet(CONNECTION_USERNAME)) {
                env.put(Context.SECURITY_PRINCIPAL, getLDAPPropertyValue(CONNECTION_USERNAME));
-            }
-            else {
+            } else {
                throw new NamingException("Empty username is not allowed");
             }
 
             if (isLoginPropertySet(CONNECTION_PASSWORD)) {
                env.put(Context.SECURITY_CREDENTIALS, getLDAPPropertyValue(CONNECTION_PASSWORD));
-            }
-            else {
+            } else {
                throw new NamingException("Empty password is not allowed");
             }
             env.put(Context.SECURITY_PROTOCOL, getLDAPPropertyValue(CONNECTION_PROTOCOL));
@@ -478,8 +465,7 @@ public class LDAPLoginModule implements LoginModule {
             env.put(Context.SECURITY_AUTHENTICATION, getLDAPPropertyValue(AUTHENTICATION));
             context = new InitialDirContext(env);
 
-         }
-         catch (NamingException e) {
+         } catch (NamingException e) {
             closeContext();
             ActiveMQServerLogger.LOGGER.error(e.toString());
             throw e;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoader.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoader.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoader.java
index 863b021..0a07658 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoader.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoader.java
@@ -106,8 +106,7 @@ public class PropertiesLoader {
          File baseDir = null;
          if (options.get("baseDir") != null) {
             baseDir = new File((String) options.get("baseDir"));
-         }
-         else {
+         } else {
             if (System.getProperty("java.security.auth.login.config") != null) {
                baseDir = new File(System.getProperty("java.security.auth.login.config")).getParentFile();
             }
@@ -138,4 +137,4 @@ public class PropertiesLoader {
    public static void resetUsersAndGroupsCache() {
       staticCache.clear();
    }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoginModule.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoginModule.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoginModule.java
index 709c510..d120a98 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoginModule.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/PropertiesLoginModule.java
@@ -45,7 +45,7 @@ public class PropertiesLoginModule extends PropertiesLoader implements LoginModu
    private CallbackHandler callbackHandler;
 
    private Properties users;
-   private Map<String,Set<String>> roles;
+   private Map<String, Set<String>> roles;
    private String user;
    private final Set<Principal> principals = new HashSet<>();
    private boolean loginSucceeded;
@@ -72,11 +72,9 @@ public class PropertiesLoginModule extends PropertiesLoader implements LoginModu
       callbacks[1] = new PasswordCallback("Password: ", false);
       try {
          callbackHandler.handle(callbacks);
-      }
-      catch (IOException ioe) {
+      } catch (IOException ioe) {
          throw new LoginException(ioe.getMessage());
-      }
-      catch (UnsupportedCallbackException uce) {
+      } catch (UnsupportedCallbackException uce) {
          throw new LoginException(uce.getMessage() + " not available to obtain information from user");
       }
       user = ((NameCallback) callbacks[0]).getName();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/ReloadableProperties.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/ReloadableProperties.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/ReloadableProperties.java
index 77a99d9..66ba1a5 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/ReloadableProperties.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/ReloadableProperties.java
@@ -56,8 +56,7 @@ public class ReloadableProperties {
             if (key.isDebug()) {
                logger.debug("Load of: " + key);
             }
-         }
-         catch (IOException e) {
+         } catch (IOException e) {
             ActiveMQServerLogger.LOGGER.error("Failed to load: " + key + ", reason:" + e.getLocalizedMessage());
             if (key.isDebug()) {
                logger.debug("Load of: " + key + ", failure exception" + e);
@@ -82,22 +81,21 @@ public class ReloadableProperties {
       if (invertedValueProps == null) {
          invertedValueProps = new HashMap<>(props.size());
          for (Map.Entry<Object, Object> val : props.entrySet()) {
-            String[] userList = ((String)val.getValue()).split(",");
+            String[] userList = ((String) val.getValue()).split(",");
             for (String user : userList) {
                Set<String> set = invertedValueProps.get(user);
                if (set == null) {
                   set = new HashSet<>();
                   invertedValueProps.put(user, set);
                }
-               set.add((String)val.getKey());
+               set.add((String) val.getKey());
             }
          }
       }
       return invertedValueProps;
    }
 
-   private void load(final File source,
-                     Properties props) throws IOException {
+   private void load(final File source, Properties props) throws IOException {
       try (FileInputStream in = new FileInputStream(source)) {
          props.load(in);
          //            if (key.isDecrypt()) {
@@ -117,4 +115,4 @@ public class ReloadableProperties {
       return key.file.lastModified() > reloadTime;
    }
 
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/TextFileCertificateLoginModule.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/TextFileCertificateLoginModule.java b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/TextFileCertificateLoginModule.java
index 45a1211..478bbf7 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/TextFileCertificateLoginModule.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/spi/core/security/jaas/TextFileCertificateLoginModule.java
@@ -47,7 +47,10 @@ public class TextFileCertificateLoginModule extends CertificateLoginModule {
     * Performs initialization of file paths. A standard JAAS override.
     */
    @Override
-   public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) {
+   public void initialize(Subject subject,
+                          CallbackHandler callbackHandler,
+                          Map<String, ?> sharedState,
+                          Map<String, ?> options) {
       super.initialize(subject, callbackHandler, sharedState, options);
       usersByDn = load(USER_FILE_PROP_NAME, "", options).invertedPropertiesMap();
       rolesByUser = load(ROLE_FILE_PROP_NAME, "", options).invertedPropertiesValuesMap();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/uri/ClusterConnectionConfigurationParser.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/uri/ClusterConnectionConfigurationParser.java b/artemis-server/src/main/java/org/apache/activemq/artemis/uri/ClusterConnectionConfigurationParser.java
index e6637de..96128c0 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/uri/ClusterConnectionConfigurationParser.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/uri/ClusterConnectionConfigurationParser.java
@@ -6,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License. You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/acceptor/TCPAcceptorTransportConfigurationSchema.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/acceptor/TCPAcceptorTransportConfigurationSchema.java b/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/acceptor/TCPAcceptorTransportConfigurationSchema.java
index ed92ac3..683b3ae 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/acceptor/TCPAcceptorTransportConfigurationSchema.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/acceptor/TCPAcceptorTransportConfigurationSchema.java
@@ -16,12 +16,12 @@
  */
 package org.apache.activemq.artemis.uri.schemas.acceptor;
 
-import org.apache.activemq.artemis.core.remoting.impl.netty.NettyAcceptorFactory;
-import org.apache.activemq.artemis.uri.schema.connector.TCPTransportConfigurationSchema;
-
 import java.net.URI;
 import java.util.Set;
 
+import org.apache.activemq.artemis.core.remoting.impl.netty.NettyAcceptorFactory;
+import org.apache.activemq.artemis.uri.schema.connector.TCPTransportConfigurationSchema;
+
 public class TCPAcceptorTransportConfigurationSchema extends TCPTransportConfigurationSchema {
 
    public TCPAcceptorTransportConfigurationSchema(Set<String> allowableProperties) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/clusterConnection/ClusterConnectionMulticastSchema.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/clusterConnection/ClusterConnectionMulticastSchema.java b/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/clusterConnection/ClusterConnectionMulticastSchema.java
index b465be4..a27e7a6 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/clusterConnection/ClusterConnectionMulticastSchema.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/clusterConnection/ClusterConnectionMulticastSchema.java
@@ -6,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License. You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -37,8 +37,7 @@ public class ClusterConnectionMulticastSchema extends ClusterConnectionStaticSch
 
       if (URISupport.isCompositeURI(uri)) {
          super.populateObject(uri, bean);
-      }
-      else {
+      } else {
          bean.setDiscoveryGroupName(uri.getHost());
          Map<String, String> parameters = URISupport.parseParameters(uri);
          BeanSupport.setData(uri, bean, parameters);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/clusterConnection/ClusterConnectionStaticSchema.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/clusterConnection/ClusterConnectionStaticSchema.java b/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/clusterConnection/ClusterConnectionStaticSchema.java
index 0f62d26..cb7ada5 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/clusterConnection/ClusterConnectionStaticSchema.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/uri/schemas/clusterConnection/ClusterConnectionStaticSchema.java
@@ -6,7 +6,7 @@
  * (the "License"); you may not use this file except in compliance with
  * the License. You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ * http://www.apache.org/licenses/LICENSE-2.0
  *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
@@ -37,7 +37,6 @@ public class ClusterConnectionStaticSchema extends URISchema<ClusterConnectionCo
                                                               Map<String, String> query,
                                                               String param) throws Exception {
 
-
       ClusterConnectionConfiguration configuration = new ClusterConnectionConfiguration();
 
       populateObject(uri, configuration);
@@ -45,7 +44,6 @@ public class ClusterConnectionStaticSchema extends URISchema<ClusterConnectionCo
       return configuration;
    }
 
-
    @Override
    public void populateObject(URI uri, ClusterConnectionConfiguration bean) throws Exception {
       URISupport.CompositeData compositeData = URISupport.parseComposite(uri);
@@ -54,7 +52,6 @@ public class ClusterConnectionStaticSchema extends URISchema<ClusterConnectionCo
       BeanSupport.setData(uri, bean, compositeData.getParameters());
    }
 
-
    @Override
    protected URI internalNewURI(ClusterConnectionConfiguration bean) throws Exception {
       return null;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/utils/TimeUtils.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/utils/TimeUtils.java b/artemis-server/src/main/java/org/apache/activemq/artemis/utils/TimeUtils.java
index faf109d..5209a48 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/utils/TimeUtils.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/utils/TimeUtils.java
@@ -23,8 +23,6 @@ import java.util.Locale;
 
 /**
  * Time utils.
- *
- * @version
  */
 public final class TimeUtils {
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/java/org/apache/activemq/artemis/utils/XMLConfigurationUtil.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/utils/XMLConfigurationUtil.java b/artemis-server/src/main/java/org/apache/activemq/artemis/utils/XMLConfigurationUtil.java
index 1327cf9..79dcd1d 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/utils/XMLConfigurationUtil.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/utils/XMLConfigurationUtil.java
@@ -43,8 +43,7 @@ public class XMLConfigurationUtil {
          double val = XMLUtil.parseDouble(nl.item(0));
          validator.validate(name, val);
          return val;
-      }
-      else {
+      } else {
          validator.validate(name, def);
          return def;
       }
@@ -59,8 +58,7 @@ public class XMLConfigurationUtil {
          String val = nl.item(0).getTextContent().trim();
          validator.validate(name, val);
          return val;
-      }
-      else {
+      } else {
          validator.validate(name, def);
          return def;
       }
@@ -75,8 +73,7 @@ public class XMLConfigurationUtil {
          long val = XMLUtil.parseLong(nl.item(0));
          validator.validate(name, val);
          return val;
-      }
-      else {
+      } else {
          validator.validate(name, def);
          return def;
       }
@@ -91,8 +88,7 @@ public class XMLConfigurationUtil {
          int val = XMLUtil.parseInt(nl.item(0));
          validator.validate(name, val);
          return val;
-      }
-      else {
+      } else {
          validator.validate(name, def);
          return def;
       }
@@ -102,8 +98,7 @@ public class XMLConfigurationUtil {
       NodeList nl = e.getElementsByTagName(name);
       if (nl.getLength() > 0) {
          return XMLUtil.parseBoolean(nl.item(0));
-      }
-      else {
+      } else {
          return def;
       }
    }
@@ -112,8 +107,7 @@ public class XMLConfigurationUtil {
       NodeList nl = e.getElementsByTagName(name);
       if (nl.getLength() > 0) {
          return true;
-      }
-      else {
+      } else {
          return false;
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/main/resources/schema/artemis-server.xsd
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/resources/schema/artemis-server.xsd b/artemis-server/src/main/resources/schema/artemis-server.xsd
index 552ce5f..1e2e816 100644
--- a/artemis-server/src/main/resources/schema/artemis-server.xsd
+++ b/artemis-server/src/main/resources/schema/artemis-server.xsd
@@ -31,16 +31,16 @@
       </xsd:annotation>
       <xsd:complexType>
          <xsd:sequence>
-                <xsd:choice minOccurs="1" maxOccurs="unbounded">
-                   <xsd:any namespace="##other">
-                      <xsd:annotation>
-                         <xsd:documentation>A profile declaration may include configuration
-                            elements from other namespaces for the subsystems that make up the profile.
-                         </xsd:documentation>
-                      </xsd:annotation>
-                   </xsd:any>
-                </xsd:choice>
-             </xsd:sequence>
+            <xsd:choice minOccurs="1" maxOccurs="unbounded">
+               <xsd:any namespace="##other">
+                  <xsd:annotation>
+                     <xsd:documentation>A profile declaration may include configuration
+                        elements from other namespaces for the subsystems that make up the profile.
+                     </xsd:documentation>
+                  </xsd:annotation>
+               </xsd:any>
+            </xsd:choice>
+         </xsd:sequence>
       </xsd:complexType>
    </xsd:element>
 </xsd:schema>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java
index 425f326..3fd1aaa 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ConfigurationImplTest.java
@@ -497,12 +497,10 @@ public class ConfigurationImplTest extends ActiveMQTestBase {
          configuration.setJournalDirectory("./data-journal");
          File journalLocation = configuration.getJournalLocation();
          Assert.assertFalse("This path shouldn't resolve to a real folder", journalLocation.exists());
-      }
-      finally {
+      } finally {
          if (oldProperty == null) {
             System.clearProperty("artemis.instance");
-         }
-         else {
+         } else {
             System.setProperty("artemis.instance", oldProperty);
          }
       }
@@ -531,12 +529,10 @@ public class ConfigurationImplTest extends ActiveMQTestBase {
          File journalLocation = configuration.getJournalLocation();
 
          Assert.assertTrue(journalLocation.exists());
-      }
-      finally {
+      } finally {
          if (oldProperty == null) {
             System.clearProperty("artemis.instance");
-         }
-         else {
+         } else {
             System.setProperty("artemis.instance", oldProperty);
          }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationParserTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationParserTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationParserTest.java
index 44f1c61..9653760 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationParserTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationParserTest.java
@@ -53,8 +53,7 @@ public class FileConfigurationParserTest extends ActiveMQTestBase {
          try {
             deploymentManager.readConfiguration();
             fail("parsing should have failed for " + filename);
-         }
-         catch (java.lang.IllegalStateException e) {
+         } catch (java.lang.IllegalStateException e) {
             Throwable cause = e.getCause();
             assertTrue("must have been org.xml.sax.SAXParseException", cause instanceof org.xml.sax.SAXParseException);
          }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
index 6045c8d..a2afd97 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/FileConfigurationTest.java
@@ -134,8 +134,7 @@ public class FileConfigurationTest extends ConfigurationImplTest {
             Assert.assertEquals("456", ac.getParams().get("tcpNoDelay"));
             Assert.assertEquals("44", ac.getParams().get("connectionTtl"));
             Assert.assertEquals("92", ac.getParams().get(TransportConstants.CONNECTIONS_ALLOWED));
-         }
-         else {
+         } else {
             Assert.assertEquals("org.apache.activemq.artemis.core.remoting.impl.invm.InVMAcceptorFactory", ac.getFactoryClassName());
             Assert.assertEquals("0", ac.getParams().get("serverId"));
             Assert.assertEquals("87", ac.getParams().get(org.apache.activemq.artemis.core.remoting.impl.invm.TransportConstants.CONNECTIONS_ALLOWED));
@@ -152,8 +151,7 @@ public class FileConfigurationTest extends ConfigurationImplTest {
             Assert.assertEquals(11999, udpBc.getGroupPort());
             Assert.assertEquals(12345, bc.getBroadcastPeriod());
             Assert.assertEquals("connector1", bc.getConnectorInfos().get(0));
-         }
-         else {
+         } else {
             Assert.assertEquals("bg2", bc.getName());
             Assert.assertEquals(12999, udpBc.getLocalBindPort());
             Assert.assertEquals("192.168.0.121", udpBc.getGroupAddress());
@@ -188,8 +186,7 @@ public class FileConfigurationTest extends ConfigurationImplTest {
             Assert.assertEquals("speed > 88", dic.getFilterString());
             Assert.assertEquals("org.foo.Transformer", dic.getTransformerClassName());
             Assert.assertEquals(true, dic.isExclusive());
-         }
-         else {
+         } else {
             Assert.assertEquals("divert2", dic.getName());
             Assert.assertEquals("routing-name2", dic.getRoutingName());
             Assert.assertEquals("address2", dic.getAddress());
@@ -219,8 +216,7 @@ public class FileConfigurationTest extends ConfigurationImplTest {
             Assert.assertEquals("connector1", bc.getStaticConnectors().get(0));
             Assert.assertEquals(null, bc.getDiscoveryGroupName());
             Assert.assertEquals(444, bc.getProducerWindowSize());
-         }
-         else {
+         } else {
             Assert.assertEquals("bridge2", bc.getName());
             Assert.assertEquals("queue2", bc.getQueueName());
             Assert.assertEquals("bridge-forwarding-address2", bc.getForwardingAddress());
@@ -262,8 +258,7 @@ public class FileConfigurationTest extends ConfigurationImplTest {
             Assert.assertEquals("connector2", ccc.getStaticConnectors().get(1));
             Assert.assertEquals(null, ccc.getDiscoveryGroupName());
             Assert.assertEquals(222, ccc.getProducerWindowSize());
-         }
-         else {
+         } else {
             Assert.assertEquals("cluster-connection2", ccc.getName());
             Assert.assertEquals("queues2", ccc.getAddress());
             Assert.assertEquals(4, ccc.getRetryInterval());
@@ -425,8 +420,7 @@ public class FileConfigurationTest extends ConfigurationImplTest {
                   FileDeploymentManager deploymentManager = new FileDeploymentManager(customConfiguration.getName());
                   deploymentManager.addDeployable(fileConfiguration);
                   deploymentManager.readConfiguration();
-               }
-               catch (Exception e) {
+               } catch (Exception e) {
                   holder.t = e;
                }
             }
@@ -441,8 +435,7 @@ public class FileConfigurationTest extends ConfigurationImplTest {
             fail("Exception caught while loading configuration with the context class loader: " + holder.t.getMessage());
          }
 
-      }
-      finally {
+      } finally {
          customConfiguration.delete();
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/HAPolicyConfigurationTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/HAPolicyConfigurationTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/HAPolicyConfigurationTest.java
index 59019dd..7bae74e 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/HAPolicyConfigurationTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/HAPolicyConfigurationTest.java
@@ -16,6 +16,8 @@
  */
 package org.apache.activemq.artemis.core.config.impl;
 
+import java.util.List;
+
 import org.apache.activemq.artemis.core.config.Configuration;
 import org.apache.activemq.artemis.core.config.FileDeploymentManager;
 import org.apache.activemq.artemis.core.server.cluster.ha.ColocatedPolicy;
@@ -37,8 +39,6 @@ import org.apache.activemq.artemis.core.server.impl.SharedStoreLiveActivation;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
 import org.junit.Test;
 
-import java.util.List;
-
 public class HAPolicyConfigurationTest extends ActiveMQTestBase {
 
    @Test
@@ -59,8 +59,7 @@ public class HAPolicyConfigurationTest extends ActiveMQTestBase {
          List<String> connectors = scaleDownPolicy.getConnectors();
          assertNotNull(connectors);
          assertEquals(connectors.size(), 0);
-      }
-      finally {
+      } finally {
          server.stop();
       }
    }
@@ -86,8 +85,7 @@ public class HAPolicyConfigurationTest extends ActiveMQTestBase {
          assertEquals(connectors.size(), 2);
          assertTrue(connectors.contains("sd-connector1"));
          assertTrue(connectors.contains("sd-connector2"));
-      }
-      finally {
+      } finally {
          server.stop();
       }
    }
@@ -122,8 +120,7 @@ public class HAPolicyConfigurationTest extends ActiveMQTestBase {
          assertTrue(replicatedPolicy.isCheckForLiveServer());
          assertEquals(replicatedPolicy.getClusterName(), "abcdefg");
          assertEquals(replicatedPolicy.getInitialReplicationSyncTimeout(), 9876);
-      }
-      finally {
+      } finally {
          server.stop();
       }
    }
@@ -152,8 +149,7 @@ public class HAPolicyConfigurationTest extends ActiveMQTestBase {
          List<String> connectors = scaleDownPolicy.getConnectors();
          assertNotNull(connectors);
          assertEquals(connectors.size(), 0);
-      }
-      finally {
+      } finally {
          server.stop();
       }
    }
@@ -182,8 +178,7 @@ public class HAPolicyConfigurationTest extends ActiveMQTestBase {
          assertEquals(connectors.size(), 2);
          assertTrue(connectors.contains("sd-connector1"));
          assertTrue(connectors.contains("sd-connector2"));
-      }
-      finally {
+      } finally {
          server.stop();
       }
    }
@@ -205,8 +200,7 @@ public class HAPolicyConfigurationTest extends ActiveMQTestBase {
          assertFalse(replicaPolicy.isRestartBackup());
          ScaleDownPolicy scaleDownPolicy = replicaPolicy.getScaleDownPolicy();
          assertNull(scaleDownPolicy);
-      }
-      finally {
+      } finally {
          server.stop();
       }
    }
@@ -223,8 +217,7 @@ public class HAPolicyConfigurationTest extends ActiveMQTestBase {
          assertTrue(haPolicy instanceof SharedStoreMasterPolicy);
          SharedStoreMasterPolicy masterPolicy = (SharedStoreMasterPolicy) haPolicy;
          assertFalse(masterPolicy.isFailoverOnServerShutdown());
-      }
-      finally {
+      } finally {
          server.stop();
       }
    }
@@ -249,8 +242,7 @@ public class HAPolicyConfigurationTest extends ActiveMQTestBase {
          List<String> connectors = scaleDownPolicy.getConnectors();
          assertNotNull(connectors);
          assertEquals(connectors.size(), 0);
-      }
-      finally {
+      } finally {
          server.stop();
       }
    }
@@ -277,8 +269,7 @@ public class HAPolicyConfigurationTest extends ActiveMQTestBase {
          assertEquals(connectors.size(), 2);
          assertTrue(connectors.contains("sd-connector1"));
          assertTrue(connectors.contains("sd-connector2"));
-      }
-      finally {
+      } finally {
          server.stop();
       }
    }
@@ -298,8 +289,7 @@ public class HAPolicyConfigurationTest extends ActiveMQTestBase {
          assertTrue(sharedStoreSlavePolicy.isRestartBackup());
          ScaleDownPolicy scaleDownPolicy = sharedStoreSlavePolicy.getScaleDownPolicy();
          assertNull(scaleDownPolicy);
-      }
-      finally {
+      } finally {
          server.stop();
       }
    }
@@ -327,8 +317,7 @@ public class HAPolicyConfigurationTest extends ActiveMQTestBase {
          assertEquals(backupPolicy.getMaxSavedReplicatedJournalsSize(), 22);
          assertEquals(backupPolicy.getClusterName(), "33rrrrr");
          assertFalse(backupPolicy.isRestartBackup());
-      }
-      finally {
+      } finally {
          server.stop();
       }
    }
@@ -352,8 +341,7 @@ public class HAPolicyConfigurationTest extends ActiveMQTestBase {
          assertEquals(livePolicy.getClusterName(), "abcdefg");
          ReplicaPolicy backupPolicy = (ReplicaPolicy) colocatedPolicy.getBackupPolicy();
          assertNotNull(backupPolicy);
-      }
-      finally {
+      } finally {
          server.stop();
       }
    }
@@ -377,8 +365,7 @@ public class HAPolicyConfigurationTest extends ActiveMQTestBase {
          assertNotNull(backupPolicy);
          assertFalse(backupPolicy.isFailoverOnServerShutdown());
          assertFalse(backupPolicy.isRestartBackup());
-      }
-      finally {
+      } finally {
          server.stop();
       }
    }
@@ -400,8 +387,7 @@ public class HAPolicyConfigurationTest extends ActiveMQTestBase {
          assertFalse(livePolicy.isFailoverOnServerShutdown());
          SharedStoreSlavePolicy backupPolicy = (SharedStoreSlavePolicy) colocatedPolicy.getBackupPolicy();
          assertNotNull(backupPolicy);
-      }
-      finally {
+      } finally {
          server.stop();
       }
    }
@@ -418,8 +404,7 @@ public class HAPolicyConfigurationTest extends ActiveMQTestBase {
          LiveOnlyPolicy liveOnlyPolicy = (LiveOnlyPolicy) haPolicy;
          ScaleDownPolicy scaleDownPolicy = liveOnlyPolicy.getScaleDownPolicy();
          assertNull(scaleDownPolicy);
-      }
-      finally {
+      } finally {
          server.stop();
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ValidatorsTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ValidatorsTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ValidatorsTest.java
index b830a68..5d4c1e8 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ValidatorsTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/ValidatorsTest.java
@@ -16,12 +16,10 @@
  */
 package org.apache.activemq.artemis.core.config.impl;
 
-import org.junit.Test;
-
-import org.junit.Assert;
-
 import org.apache.activemq.artemis.core.server.JournalType;
 import org.apache.activemq.artemis.utils.RandomUtil;
+import org.junit.Assert;
+import org.junit.Test;
 
 public class ValidatorsTest extends Assert {
 
@@ -33,8 +31,7 @@ public class ValidatorsTest extends Assert {
       try {
          validator.validate(RandomUtil.randomString(), value);
          Assert.fail(validator + " must not validate " + value);
-      }
-      catch (IllegalArgumentException e) {
+      } catch (IllegalArgumentException e) {
 
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/WrongRoleFileConfigurationParserTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/WrongRoleFileConfigurationParserTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/WrongRoleFileConfigurationParserTest.java
index 9e8ffbc..d3f7679 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/WrongRoleFileConfigurationParserTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/config/impl/WrongRoleFileConfigurationParserTest.java
@@ -16,6 +16,9 @@
  */
 package org.apache.activemq.artemis.core.config.impl;
 
+import java.io.ByteArrayInputStream;
+import java.nio.charset.StandardCharsets;
+
 import org.apache.activemq.artemis.core.deployers.impl.FileConfigurationParser;
 import org.apache.activemq.artemis.logs.AssertionLoggerHandler;
 import org.apache.activemq.artemis.tests.util.ActiveMQTestBase;
@@ -23,9 +26,6 @@ import org.junit.AfterClass;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-import java.io.ByteArrayInputStream;
-import java.nio.charset.StandardCharsets;
-
 /**
  * When running this test from an IDE add this to the test command line so that the AssertionLoggerHandler works properly:
  * -Djava.util.logging.manager=org.jboss.logmanager.LogManager  -Dlogging.configuration=file:<path_to_source>/tests/config/logging.properties

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-server/src/test/java/org/apache/activemq/artemis/core/filter/impl/FilterTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/filter/impl/FilterTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/filter/impl/FilterTest.java
index 18935dd..d73accd 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/filter/impl/FilterTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/filter/impl/FilterTest.java
@@ -134,8 +134,7 @@ public class FilterTest extends SilentTestCase {
 
          if (i == 3) {
             Assert.assertTrue(filter.match(message));
-         }
-         else {
+         } else {
             Assert.assertFalse(filter.match(message));
          }
       }
@@ -705,11 +704,9 @@ public class FilterTest extends SilentTestCase {
       try {
          filter = FilterImpl.createFilter(filterString);
          Assert.fail("Should throw exception");
-      }
-      catch (ActiveMQInvalidFilterExpressionException ife) {
+      } catch (ActiveMQInvalidFilterExpressionException ife) {
          //pass
-      }
-      catch (ActiveMQException e) {
+      } catch (ActiveMQException e) {
          fail("Invalid exception type:" + e.getType());
       }
    }
@@ -718,11 +715,9 @@ public class FilterTest extends SilentTestCase {
       try {
          filter = FilterImpl.createFilter(filterString);
          Assert.fail("Should throw exception");
-      }
-      catch (ActiveMQInvalidFilterExpressionException ife) {
+      } catch (ActiveMQInvalidFilterExpressionException ife) {
          //pass
-      }
-      catch (ActiveMQException e) {
+      } catch (ActiveMQException e) {
          fail("Invalid exception type:" + e.getType());
       }
    }


Mime
View raw message