activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martyntay...@apache.org
Subject [47/52] [partial] activemq-artemis git commit: ARTEMIS-765 Improve Checkstyle
Date Fri, 30 Sep 2016 15:26:47 GMT
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/pom.xml
----------------------------------------------------------------------
diff --git a/artemis-core-client/pom.xml b/artemis-core-client/pom.xml
index e986738..d4f9739 100644
--- a/artemis-core-client/pom.xml
+++ b/artemis-core-client/pom.xml
@@ -14,7 +14,8 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
 
    <parent>
@@ -93,7 +94,8 @@
                      <maxmemory>512m</maxmemory>
                      <quiet>false</quiet>
                      <aggregate>true</aggregate>
-                     <excludePackageNames>org.apache.activemq.artemis.core:org.apache.activemq.artemis.utils</excludePackageNames>
+                     <excludePackageNames>org.apache.activemq.artemis.core:org.apache.activemq.artemis.utils
+                     </excludePackageNames>
                   </configuration>
                   <executions>
                      <execution>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
index 4ba7329..e07493f 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java
@@ -526,7 +526,9 @@ public final class ActiveMQDefaultConfiguration {
       return DEFAULT_MANAGEMENT_NOTIFICATION_ADDRESS;
    }
 
-   /** The default Cluster address for the Cluster connection*/
+   /**
+    * The default Cluster address for the Cluster connection
+    */
    public static String getDefaultClusterAddress() {
       return DEFAULT_CLUSTER_ADDRESS;
    }
@@ -733,6 +735,7 @@ public final class ActiveMQDefaultConfiguration {
 
    /**
     * How many journal files can be resued
+    *
     * @return
     */
    public static int getDefaultJournalPoolFiles() {
@@ -1060,14 +1063,14 @@ public final class ActiveMQDefaultConfiguration {
 
    /**
     * if we have to start as a replicated server this is the delay to wait before fail-back occurs
-    * @deprecated  use getDefaultInitialReplicationSyncTimeout()
+    *
+    * @deprecated use getDefaultInitialReplicationSyncTimeout()
     */
    @Deprecated
    public static long getDefaultFailbackDelay() {
       return 5000;
    }
 
-
    /**
     * Will this backup server come live on a normal server shutdown
     */
@@ -1151,7 +1154,9 @@ public final class ActiveMQDefaultConfiguration {
       return DEFAULT_CONFIGURATION_FILE_REFRESH_PERIOD;
    }
 
-   /** The default global max size. -1 = no global max size. */
+   /**
+    * The default global max size. -1 = no global max size.
+    */
    public static long getDefaultMaxGlobalSize() {
       return DEFAULT_GLOBAL_MAX_SIZE;
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BroadcastGroupConfiguration.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BroadcastGroupConfiguration.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BroadcastGroupConfiguration.java
index 095deb0..168d840 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BroadcastGroupConfiguration.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/BroadcastGroupConfiguration.java
@@ -101,20 +101,17 @@ public final class BroadcastGroupConfiguration implements Serializable {
       if (connectorInfos == null) {
          if (other.connectorInfos != null)
             return false;
-      }
-      else if (!connectorInfos.equals(other.connectorInfos))
+      } else if (!connectorInfos.equals(other.connectorInfos))
          return false;
       if (endpointFactory == null) {
          if (other.endpointFactory != null)
             return false;
-      }
-      else if (!endpointFactory.equals(other.endpointFactory))
+      } else if (!endpointFactory.equals(other.endpointFactory))
          return false;
       if (name == null) {
          if (other.name != null)
             return false;
-      }
-      else if (!name.equals(other.name))
+      } else if (!name.equals(other.name))
          return false;
       return true;
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/FilterConstants.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/FilterConstants.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/FilterConstants.java
index 27aa9b4..c4809f6 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/FilterConstants.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/FilterConstants.java
@@ -72,7 +72,6 @@ public final class FilterConstants {
     */
    public static final SimpleString ACTIVEMQ_PREFIX = new SimpleString("AMQ");
 
-
    private FilterConstants() {
       // Utility class
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsBroadcastEndpoint.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsBroadcastEndpoint.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsBroadcastEndpoint.java
index 79c7e14..6487808 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsBroadcastEndpoint.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsBroadcastEndpoint.java
@@ -16,12 +16,13 @@
  */
 package org.apache.activemq.artemis.api.core;
 
+import java.util.concurrent.TimeUnit;
+
 import org.apache.activemq.artemis.api.core.jgroups.JChannelManager;
 import org.apache.activemq.artemis.api.core.jgroups.JChannelWrapper;
 import org.apache.activemq.artemis.api.core.jgroups.JGroupsReceiver;
 import org.jboss.logging.Logger;
 import org.jgroups.JChannel;
-import java.util.concurrent.TimeUnit;
 
 /**
  * This class is the implementation of ActiveMQ Artemis members discovery that will use JGroups.
@@ -49,7 +50,8 @@ public abstract class JGroupsBroadcastEndpoint implements BroadcastEndpoint {
 
    @Override
    public void broadcast(final byte[] data) throws Exception {
-      if (logger.isTraceEnabled()) logger.trace("Broadcasting: BroadCastOpened=" + broadcastOpened + ", channelOPen=" + channel.getChannel().isOpen());
+      if (logger.isTraceEnabled())
+         logger.trace("Broadcasting: BroadCastOpened=" + broadcastOpened + ", channelOPen=" + channel.getChannel().isOpen());
       if (broadcastOpened) {
          org.jgroups.Message msg = new org.jgroups.Message();
 
@@ -61,22 +63,22 @@ public abstract class JGroupsBroadcastEndpoint implements BroadcastEndpoint {
 
    @Override
    public byte[] receiveBroadcast() throws Exception {
-      if (logger.isTraceEnabled()) logger.trace("Receiving Broadcast: clientOpened=" + clientOpened + ", channelOPen=" + channel.getChannel().isOpen());
+      if (logger.isTraceEnabled())
+         logger.trace("Receiving Broadcast: clientOpened=" + clientOpened + ", channelOPen=" + channel.getChannel().isOpen());
       if (clientOpened) {
          return receiver.receiveBroadcast();
-      }
-      else {
+      } else {
          return null;
       }
    }
 
    @Override
    public byte[] receiveBroadcast(long time, TimeUnit unit) throws Exception {
-      if (logger.isTraceEnabled()) logger.trace("Receiving Broadcast2: clientOpened=" + clientOpened + ", channelOPen=" + channel.getChannel().isOpen());
+      if (logger.isTraceEnabled())
+         logger.trace("Receiving Broadcast2: clientOpened=" + clientOpened + ", channelOPen=" + channel.getChannel().isOpen());
       if (clientOpened) {
          return receiver.receiveBroadcast(time, unit);
-      }
-      else {
+      } else {
          return null;
       }
    }
@@ -115,8 +117,7 @@ public abstract class JGroupsBroadcastEndpoint implements BroadcastEndpoint {
    public synchronized void close(boolean isBroadcast) throws Exception {
       if (isBroadcast) {
          broadcastOpened = false;
-      }
-      else {
+      } else {
          channel.removeReceiver(receiver);
          clientOpened = false;
       }
@@ -126,6 +127,7 @@ public abstract class JGroupsBroadcastEndpoint implements BroadcastEndpoint {
    /**
     * Closes the channel used in this JGroups Broadcast.
     * Can be overridden by implementations that use an externally managed channel.
+    *
     * @param channel
     */
    protected synchronized void internalCloseChannel(JChannelWrapper channel) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsChannelBroadcastEndpoint.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsChannelBroadcastEndpoint.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsChannelBroadcastEndpoint.java
index 96cfee6..2317169 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsChannelBroadcastEndpoint.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsChannelBroadcastEndpoint.java
@@ -29,7 +29,7 @@ public class JGroupsChannelBroadcastEndpoint extends JGroupsBroadcastEndpoint {
 
    private final JChannel jChannel;
 
-   public JGroupsChannelBroadcastEndpoint(JChannelManager manager, JChannel jChannel, final String channelName)  {
+   public JGroupsChannelBroadcastEndpoint(JChannelManager manager, JChannel jChannel, final String channelName) {
       super(manager, channelName);
       this.jChannel = jChannel;
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsFileBroadcastEndpoint.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsFileBroadcastEndpoint.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsFileBroadcastEndpoint.java
index be903d3..d5f8011 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsFileBroadcastEndpoint.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsFileBroadcastEndpoint.java
@@ -16,11 +16,11 @@
  */
 package org.apache.activemq.artemis.api.core;
 
+import java.net.URL;
+
 import org.apache.activemq.artemis.api.core.jgroups.JChannelManager;
 import org.jgroups.JChannel;
 
-import java.net.URL;
-
 /**
  * This class is the implementation of ActiveMQ Artemis members discovery that will use JGroups.
  */
@@ -28,7 +28,9 @@ public final class JGroupsFileBroadcastEndpoint extends JGroupsBroadcastEndpoint
 
    private String file;
 
-   public JGroupsFileBroadcastEndpoint(final JChannelManager manager, final String file, final String channelName) throws Exception {
+   public JGroupsFileBroadcastEndpoint(final JChannelManager manager,
+                                       final String file,
+                                       final String channelName) throws Exception {
       super(manager, channelName);
       this.file = file;
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsFileBroadcastEndpointFactory.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsFileBroadcastEndpointFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsFileBroadcastEndpointFactory.java
index f560c71..5aaae0c 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsFileBroadcastEndpointFactory.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsFileBroadcastEndpointFactory.java
@@ -16,7 +16,6 @@
  */
 package org.apache.activemq.artemis.api.core;
 
-
 import org.apache.activemq.artemis.api.core.jgroups.JChannelManager;
 
 public class JGroupsFileBroadcastEndpointFactory implements BroadcastEndpointFactory {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsPropertiesBroadcastEndpoint.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsPropertiesBroadcastEndpoint.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsPropertiesBroadcastEndpoint.java
index d10400a..bd29a1f 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsPropertiesBroadcastEndpoint.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JGroupsPropertiesBroadcastEndpoint.java
@@ -23,11 +23,13 @@ import org.jgroups.conf.PlainConfigurator;
 /**
  * This class is the implementation of ActiveMQ Artemis members discovery that will use JGroups.
  */
-public final  class JGroupsPropertiesBroadcastEndpoint extends JGroupsBroadcastEndpoint {
+public final class JGroupsPropertiesBroadcastEndpoint extends JGroupsBroadcastEndpoint {
 
    private String properties;
 
-   public JGroupsPropertiesBroadcastEndpoint(final JChannelManager manager, final String properties, final String channelName) throws Exception {
+   public JGroupsPropertiesBroadcastEndpoint(final JChannelManager manager,
+                                             final String properties,
+                                             final String channelName) throws Exception {
       super(manager, channelName);
       this.properties = properties;
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JsonUtil.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JsonUtil.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JsonUtil.java
index 6c47a28..a8463c4 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JsonUtil.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/JsonUtil.java
@@ -16,12 +16,6 @@
  */
 package org.apache.activemq.artemis.api.core;
 
-import org.apache.activemq.artemis.core.client.ActiveMQClientMessageBundle;
-import org.apache.activemq.artemis.utils.Base64;
-import org.apache.activemq.artemis.utils.JsonLoader;
-import org.apache.activemq.artemis.utils.ObjectInputStreamWithClassLoader;
-import org.apache.activemq.artemis.utils.StringEscapeUtils;
-
 import javax.json.Json;
 import javax.json.JsonArray;
 import javax.json.JsonArrayBuilder;
@@ -39,7 +33,14 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import org.apache.activemq.artemis.core.client.ActiveMQClientMessageBundle;
+import org.apache.activemq.artemis.utils.Base64;
+import org.apache.activemq.artemis.utils.JsonLoader;
+import org.apache.activemq.artemis.utils.ObjectInputStreamWithClassLoader;
+import org.apache.activemq.artemis.utils.StringEscapeUtils;
+
 public final class JsonUtil {
+
    public static JsonArray toJSONArray(final Object[] array) throws Exception {
       JsonArrayBuilder jsonArray = JsonLoader.createArrayBuilder();
 
@@ -58,15 +59,13 @@ public final class JsonUtil {
                   if (val.getClass().isArray()) {
                      JsonArray objectArray = toJSONArray((Object[]) val);
                      jsonObject.add(key, objectArray);
-                  }
-                  else {
+                  } else {
                      addToObject(key, val, jsonObject);
                   }
                }
             }
             jsonArray.add(jsonObject);
-         }
-         else {
+         } else {
             if (parameter != null) {
                Class<?> clz = parameter.getClass();
 
@@ -82,16 +81,13 @@ public final class JsonUtil {
                      JsonObjectBuilder jsonObject = JsonLoader.createObjectBuilder();
                      jsonObject.add(CompositeData.class.getName(), innerJsonArray);
                      jsonArray.add(jsonObject);
-                  }
-                  else {
+                  } else {
                      jsonArray.add(toJSONArray(innerArray));
                   }
-               }
-               else {
+               } else {
                   addToArray(parameter, jsonArray);
                }
-            }
-            else {
+            } else {
                jsonArray.addNull();
             }
          }
@@ -109,8 +105,7 @@ public final class JsonUtil {
             Object[] inner = fromJsonArray((JsonArray) val);
 
             array[i] = inner;
-         }
-         else if (val instanceof JsonObject) {
+         } else if (val instanceof JsonObject) {
             JsonObject jsonObject = (JsonObject) val;
 
             Map<String, Object> map = new HashMap<>();
@@ -122,26 +117,20 @@ public final class JsonUtil {
 
                if (innerVal instanceof JsonArray) {
                   innerVal = fromJsonArray(((JsonArray) innerVal));
-               }
-               else if (innerVal instanceof JsonString) {
-                  innerVal = ((JsonString)innerVal).getString();
-               }
-               else if (innerVal == JsonValue.FALSE) {
+               } else if (innerVal instanceof JsonString) {
+                  innerVal = ((JsonString) innerVal).getString();
+               } else if (innerVal == JsonValue.FALSE) {
                   innerVal = Boolean.FALSE;
-               }
-               else if (innerVal == JsonValue.TRUE) {
+               } else if (innerVal == JsonValue.TRUE) {
                   innerVal = Boolean.TRUE;
-               }
-               else if (innerVal instanceof JsonNumber) {
-                  JsonNumber jsonNumber = (JsonNumber)innerVal;
+               } else if (innerVal instanceof JsonNumber) {
+                  JsonNumber jsonNumber = (JsonNumber) innerVal;
                   if (jsonNumber.isIntegral()) {
                      innerVal = jsonNumber.longValue();
-                  }
-                  else {
+                  } else {
                      innerVal = jsonNumber.doubleValue();
                   }
-               }
-               else if (innerVal instanceof JsonObject) {
+               } else if (innerVal instanceof JsonObject) {
                   Map<String, Object> innerMap = new HashMap<>();
                   JsonObject o = (JsonObject) innerVal;
                   Set<String> innerKeys = o.keySet();
@@ -154,7 +143,7 @@ public final class JsonUtil {
                   Object[] data = (Object[]) innerVal;
                   CompositeData[] cds = new CompositeData[data.length];
                   for (int i1 = 0; i1 < data.length; i1++) {
-                     String dataConverted  = convertJsonValue(data[i1], String.class).toString();
+                     String dataConverted = convertJsonValue(data[i1], String.class).toString();
                      ObjectInputStreamWithClassLoader ois = new ObjectInputStreamWithClassLoader(new ByteArrayInputStream(Base64.decode(dataConverted)));
                      ois.setWhiteList("java.util,java.lang,javax.management");
                      cds[i1] = (CompositeDataSupport) ois.readObject();
@@ -166,30 +155,23 @@ public final class JsonUtil {
             }
 
             array[i] = map;
-         }
-         else if (val instanceof JsonString) {
-            array[i] = ((JsonString)val).getString();
-         }
-         else if (val == JsonValue.FALSE) {
+         } else if (val instanceof JsonString) {
+            array[i] = ((JsonString) val).getString();
+         } else if (val == JsonValue.FALSE) {
             array[i] = Boolean.FALSE;
-         }
-         else if (val == JsonValue.TRUE) {
+         } else if (val == JsonValue.TRUE) {
             array[i] = Boolean.TRUE;
-         }
-         else if (val instanceof JsonNumber) {
-            JsonNumber jsonNumber = (JsonNumber)val;
+         } else if (val instanceof JsonNumber) {
+            JsonNumber jsonNumber = (JsonNumber) val;
             if (jsonNumber.isIntegral()) {
                array[i] = jsonNumber.longValue();
-            }
-            else {
+            } else {
                array[i] = jsonNumber.doubleValue();
             }
-         }
-         else {
+         } else {
             if (val == JsonValue.NULL) {
                array[i] = null;
-            }
-            else {
+            } else {
                array[i] = val;
             }
          }
@@ -205,36 +187,26 @@ public final class JsonUtil {
    public static void addToObject(final String key, final Object param, final JsonObjectBuilder jsonObjectBuilder) {
       if (param instanceof Integer) {
          jsonObjectBuilder.add(key, (Integer) param);
-      }
-      else if (param instanceof Long) {
+      } else if (param instanceof Long) {
          jsonObjectBuilder.add(key, (Long) param);
-      }
-      else if (param instanceof Double) {
+      } else if (param instanceof Double) {
          jsonObjectBuilder.add(key, (Double) param);
-      }
-      else if (param instanceof String) {
+      } else if (param instanceof String) {
          jsonObjectBuilder.add(key, (String) param);
-      }
-      else if (param instanceof Boolean) {
+      } else if (param instanceof Boolean) {
          jsonObjectBuilder.add(key, (Boolean) param);
-      }
-      else if (param instanceof Map) {
-         JsonObject mapObject = toJsonObject((Map<String,Object>) param);
+      } else if (param instanceof Map) {
+         JsonObject mapObject = toJsonObject((Map<String, Object>) param);
          jsonObjectBuilder.add(key, mapObject);
-      }
-      else if (param instanceof Short) {
+      } else if (param instanceof Short) {
          jsonObjectBuilder.add(key, (Short) param);
-      }
-      else if (param instanceof Byte) {
+      } else if (param instanceof Byte) {
          jsonObjectBuilder.add(key, ((Byte) param).shortValue());
-      }
-      else if (param instanceof SimpleString) {
+      } else if (param instanceof SimpleString) {
          jsonObjectBuilder.add(key, param.toString());
-      }
-      else if (param == null) {
+      } else if (param == null) {
          jsonObjectBuilder.addNull(key);
-      }
-      else {
+      } else {
          throw ActiveMQClientMessageBundle.BUNDLE.invalidManagementParam(param.getClass().getName());
       }
    }
@@ -242,33 +214,24 @@ public final class JsonUtil {
    public static void addToArray(final Object param, final JsonArrayBuilder jsonArrayBuilder) {
       if (param instanceof Integer) {
          jsonArrayBuilder.add((Integer) param);
-      }
-      else if (param instanceof Long) {
+      } else if (param instanceof Long) {
          jsonArrayBuilder.add((Long) param);
-      }
-      else if (param instanceof Double) {
+      } else if (param instanceof Double) {
          jsonArrayBuilder.add((Double) param);
-      }
-      else if (param instanceof String) {
+      } else if (param instanceof String) {
          jsonArrayBuilder.add((String) param);
-      }
-      else if (param instanceof Boolean) {
+      } else if (param instanceof Boolean) {
          jsonArrayBuilder.add((Boolean) param);
-      }
-      else if (param instanceof Map) {
-         JsonObject mapObject = toJsonObject((Map<String,Object>) param);
+      } else if (param instanceof Map) {
+         JsonObject mapObject = toJsonObject((Map<String, Object>) param);
          jsonArrayBuilder.add(mapObject);
-      }
-      else if (param instanceof Short) {
+      } else if (param instanceof Short) {
          jsonArrayBuilder.add((Short) param);
-      }
-      else if (param instanceof Byte) {
+      } else if (param instanceof Byte) {
          jsonArrayBuilder.add(((Byte) param).shortValue());
-      }
-      else if (param == null) {
+      } else if (param == null) {
          jsonArrayBuilder.addNull();
-      }
-      else {
+      } else {
          throw ActiveMQClientMessageBundle.BUNDLE.invalidManagementParam(param.getClass().getName());
       }
    }
@@ -307,75 +270,59 @@ public final class JsonUtil {
 
          if (desiredType == null || desiredType == Long.class || desiredType == Long.TYPE) {
             return number.longValue();
-         }
-         else if (desiredType == Integer.class || desiredType == Integer.TYPE) {
+         } else if (desiredType == Integer.class || desiredType == Integer.TYPE) {
             return number.intValue();
-         }
-         else if (desiredType == Double.class || desiredType == Double.TYPE) {
+         } else if (desiredType == Double.class || desiredType == Double.TYPE) {
             return number.doubleValue();
-         }
-         else {
+         } else {
             return number.longValue();
          }
-      }
-      else if (jsonValue instanceof JsonString) {
+      } else if (jsonValue instanceof JsonString) {
          return ((JsonString) jsonValue).getString();
-      }
-      else if (jsonValue instanceof JsonValue) {
+      } else if (jsonValue instanceof JsonValue) {
          if (jsonValue == JsonValue.TRUE) {
             return true;
-         }
-         else if (jsonValue == JsonValue.FALSE) {
+         } else if (jsonValue == JsonValue.FALSE) {
             return false;
-         }
-         else {
+         } else {
             return jsonValue.toString();
          }
-      }
-      else if (jsonValue instanceof  Number) {
-         Number jsonNumber = (Number)jsonValue;
+      } else if (jsonValue instanceof Number) {
+         Number jsonNumber = (Number) jsonValue;
          if (desiredType == Integer.TYPE || desiredType == Integer.class) {
-            return  jsonNumber.intValue();
-         }
-         else if (desiredType == Long.TYPE || desiredType == Long.class) {
+            return jsonNumber.intValue();
+         } else if (desiredType == Long.TYPE || desiredType == Long.class) {
             return jsonNumber.longValue();
-         }
-         else if (desiredType == Double.TYPE || desiredType == Double.class) {
+         } else if (desiredType == Double.TYPE || desiredType == Double.class) {
             return jsonNumber.doubleValue();
-         }
-         else if (desiredType == Short.TYPE || desiredType == Short.class) {
+         } else if (desiredType == Short.TYPE || desiredType == Short.class) {
             return jsonNumber.shortValue();
-         }
-         else {
+         } else {
             return jsonValue;
          }
-      }
-      else if (jsonValue instanceof Object[]) {
+      } else if (jsonValue instanceof Object[]) {
          Object[] array = (Object[]) jsonValue;
          for (int i = 0; i < array.length; i++) {
             array[i] = convertJsonValue(array[i], desiredType);
          }
          return array;
-      }
-      else {
+      } else {
          return jsonValue;
       }
    }
 
-
-
    private JsonUtil() {
    }
 
    private static class NullableJsonString implements JsonValue, JsonString {
+
       private final String value;
       private String escape;
 
       NullableJsonString(String value) {
          if (value == null || value.length() == 0) {
             this.value = null;
-         }
-         else {
+         } else {
             this.value = value;
          }
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Message.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Message.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Message.java
index 01db007..1ea9309 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Message.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/Message.java
@@ -53,7 +53,8 @@ public interface Message {
 
    /**
     * the actual time the message was expired.
-    * * *  */
+    * * *
+    */
    SimpleString HDR_ACTUAL_EXPIRY_TIME = new SimpleString("_AMQ_ACTUAL_EXPIRY");
 
    /**
@@ -585,7 +586,6 @@ public interface Message {
     */
    Map<String, Object> toMap();
 
-
    /**
     * @return Returns the message properties in Map form, useful when encoding to JSON
     */

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TransportConfiguration.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TransportConfiguration.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TransportConfiguration.java
index 288ace1..3b0359f 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TransportConfiguration.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/TransportConfiguration.java
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.artemis.api.core;
 
+import javax.json.JsonObject;
 import java.io.Serializable;
 import java.util.HashMap;
 import java.util.Map;
@@ -26,8 +27,6 @@ import org.apache.activemq.artemis.core.remoting.impl.netty.TransportConstants;
 import org.apache.activemq.artemis.utils.JsonLoader;
 import org.apache.activemq.artemis.utils.UUIDGenerator;
 
-import javax.json.JsonObject;
-
 /**
  * A TransportConfiguration is used by a client to specify connections to a server and its backup if
  * one exists.
@@ -65,12 +64,7 @@ public class TransportConfiguration implements Serializable {
    private static final byte TYPE_STRING = 3;
 
    public JsonObject toJson() {
-      return JsonLoader.createObjectBuilder()
-            .add("name", name)
-            .add("factoryClassName", factoryClassName)
-            .add("params", JsonUtil.toJsonObject(params))
-            .add("extraProps", JsonUtil.toJsonObject(extraProps))
-            .build();
+      return JsonLoader.createObjectBuilder().add("name", name).add("factoryClassName", factoryClassName).add("params", JsonUtil.toJsonObject(params)).add("extraProps", JsonUtil.toJsonObject(extraProps)).build();
    }
 
    /**
@@ -114,18 +108,20 @@ public class TransportConfiguration implements Serializable {
     * Creates a TransportConfiguration with a specific name providing the class name of the {@link org.apache.activemq.artemis.spi.core.remoting.ConnectorFactory}
     * and any parameters needed.
     *
-    * @param className   The class name of the ConnectorFactory
-    * @param params      The parameters needed by the ConnectorFactory
-    * @param name        The name of this TransportConfiguration
-    * @param extraProps  The extra properties that specific to protocols
+    * @param className  The class name of the ConnectorFactory
+    * @param params     The parameters needed by the ConnectorFactory
+    * @param name       The name of this TransportConfiguration
+    * @param extraProps The extra properties that specific to protocols
     */
-   public TransportConfiguration(final String className, final Map<String, Object> params, final String name, final Map<String, Object> extraProps) {
+   public TransportConfiguration(final String className,
+                                 final Map<String, Object> params,
+                                 final String name,
+                                 final Map<String, Object> extraProps) {
       factoryClassName = className;
 
       if (params == null || params.isEmpty()) {
          this.params = TransportConfigurationUtil.getDefaults(className);
-      }
-      else {
+      } else {
          this.params = params;
       }
 
@@ -134,7 +130,7 @@ public class TransportConfiguration implements Serializable {
    }
 
    public TransportConfiguration newTransportConfig(String newName) {
-      return new TransportConfiguration(factoryClassName,  params, newName);
+      return new TransportConfiguration(factoryClassName, params, newName);
    }
 
    /**
@@ -236,14 +232,11 @@ public class TransportConfiguration implements Serializable {
    public boolean isEquivalent(TransportConfiguration otherConfig) {
       if (this.getFactoryClassName().equals(otherConfig.getFactoryClassName())) {
          return true;
-      }
-      else if (this.getFactoryClassName().contains("Netty") && otherConfig.getFactoryClassName().contains("Netty")) {
+      } else if (this.getFactoryClassName().contains("Netty") && otherConfig.getFactoryClassName().contains("Netty")) {
          return true;
-      }
-      else if (this.getFactoryClassName().contains("InVM") && otherConfig.getFactoryClassName().contains("InVM")) {
+      } else if (this.getFactoryClassName().contains("InVM") && otherConfig.getFactoryClassName().contains("InVM")) {
          return true;
-      }
-      else {
+      } else {
          return false;
       }
    }
@@ -271,8 +264,7 @@ public class TransportConfiguration implements Serializable {
             String val;
             if (key.equals(TransportConstants.KEYSTORE_PASSWORD_PROP_NAME) || key.equals(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME)) {
                val = "****";
-            }
-            else {
+            } else {
                val = entry.getValue() == null ? "null" : entry.getValue().toString();
             }
 
@@ -307,20 +299,16 @@ public class TransportConfiguration implements Serializable {
          if (val instanceof Boolean) {
             buffer.writeByte(TransportConfiguration.TYPE_BOOLEAN);
             buffer.writeBoolean((Boolean) val);
-         }
-         else if (val instanceof Integer) {
+         } else if (val instanceof Integer) {
             buffer.writeByte(TransportConfiguration.TYPE_INT);
             buffer.writeInt((Integer) val);
-         }
-         else if (val instanceof Long) {
+         } else if (val instanceof Long) {
             buffer.writeByte(TransportConfiguration.TYPE_LONG);
             buffer.writeLong((Long) val);
-         }
-         else if (val instanceof String) {
+         } else if (val instanceof String) {
             buffer.writeByte(TransportConfiguration.TYPE_STRING);
             buffer.writeString((String) val);
-         }
-         else {
+         } else {
             throw ActiveMQClientMessageBundle.BUNDLE.invalidEncodeType(val);
          }
       }
@@ -364,8 +352,7 @@ public class TransportConfiguration implements Serializable {
          if (num > 0) {
             params = new HashMap<>();
          }
-      }
-      else {
+      } else {
          params.clear();
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/UDPBroadcastEndpointFactory.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/UDPBroadcastEndpointFactory.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/UDPBroadcastEndpointFactory.java
index e5cc1ff..c257ade 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/UDPBroadcastEndpointFactory.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/UDPBroadcastEndpointFactory.java
@@ -150,12 +150,10 @@ public final class UDPBroadcastEndpointFactory implements BroadcastEndpointFacto
          while (open) {
             try {
                receivingSocket.receive(packet);
-            }
-            // TODO: Do we need this?
-            catch (InterruptedIOException e) {
+            } catch (InterruptedIOException e) {
+               // TODO: Do we need this?
                continue;
-            }
-            catch (IOException e) {
+            } catch (IOException e) {
                if (open) {
                   ActiveMQClientLogger.LOGGER.warn(this + " getting exception when receiving broadcasting.", e);
                }
@@ -176,8 +174,7 @@ public final class UDPBroadcastEndpointFactory implements BroadcastEndpointFacto
       public void openBroadcaster() throws Exception {
          if (localBindPort != -1) {
             broadcastingSocket = new DatagramSocket(localBindPort, localAddress);
-         }
-         else {
+         } else {
             if (localAddress != null) {
                for (int i = 0; i < 100; i++) {
                   int nextPort = RandomUtil.randomInterval(3000, 4000);
@@ -185,8 +182,7 @@ public final class UDPBroadcastEndpointFactory implements BroadcastEndpointFacto
                      broadcastingSocket = new DatagramSocket(nextPort, localAddress);
                      ActiveMQClientLogger.LOGGER.broadcastGroupBindError(localAddress.toString() + ":" + nextPort);
                      break;
-                  }
-                  catch (Exception e) {
+                  } catch (Exception e) {
                      ActiveMQClientLogger.LOGGER.broadcastGroupBindErrorRetry(localAddress.toString() + ":" + nextPort, e);
                   }
                }
@@ -205,14 +201,12 @@ public final class UDPBroadcastEndpointFactory implements BroadcastEndpointFacto
          if (checkForLinux() || checkForSolaris() || checkForHp()) {
             try {
                receivingSocket = new MulticastSocket(new InetSocketAddress(groupAddress, groupPort));
-            }
-            catch (IOException e) {
+            } catch (IOException e) {
                ActiveMQClientLogger.LOGGER.ioDiscoveryError(groupAddress.getHostAddress(), groupAddress instanceof Inet4Address ? "IPv4" : "IPv6");
 
                receivingSocket = new MulticastSocket(groupPort);
             }
-         }
-         else {
+         } else {
             receivingSocket = new MulticastSocket(groupPort);
          }
 
@@ -267,8 +261,7 @@ public final class UDPBroadcastEndpointFactory implements BroadcastEndpointFacto
             tmp = defaultValue;
          }
          return tmp;
-      }
-      catch (Throwable t) {
+      } catch (Throwable t) {
          ActiveMQClientLogger.LOGGER.warn(t);
          return defaultValue;
       }
@@ -279,8 +272,7 @@ public final class UDPBroadcastEndpointFactory implements BroadcastEndpointFacto
 
       try {
          return Integer.parseInt(value);
-      }
-      catch (Throwable t) {
+      } catch (Throwable t) {
          ActiveMQClientLogger.LOGGER.warn(t.getMessage(), t);
          return Integer.parseInt(defaultValue);
       }
@@ -308,8 +300,7 @@ public final class UDPBroadcastEndpointFactory implements BroadcastEndpointFacto
       if (groupAddress == null) {
          if (other.groupAddress != null)
             return false;
-      }
-      else if (!groupAddress.equals(other.groupAddress))
+      } else if (!groupAddress.equals(other.groupAddress))
          return false;
       if (groupPort != other.groupPort)
          return false;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ActiveMQClient.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ActiveMQClient.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ActiveMQClient.java
index b6615be..0ad80fc 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ActiveMQClient.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ActiveMQClient.java
@@ -144,7 +144,6 @@ public final class ActiveMQClient {
 
    private static ScheduledExecutorService globalScheduledThreadPool;
 
-
    static {
       initializeGlobalThreadPoolProperties();
    }
@@ -153,7 +152,6 @@ public final class ActiveMQClient {
       clearThreadPools(10, TimeUnit.SECONDS);
    }
 
-
    public static synchronized void clearThreadPools(long time, TimeUnit unit) {
 
       if (injectedPools) {
@@ -170,11 +168,9 @@ public final class ActiveMQClient {
                globalThreadPool.shutdownNow();
                ActiveMQClientLogger.LOGGER.warn("Couldn't finish the client globalThreadPool in less than 10 seconds, interrupting it now");
             }
-         }
-         catch (InterruptedException e) {
+         } catch (InterruptedException e) {
             throw new ActiveMQInterruptedException(e);
-         }
-         finally {
+         } finally {
             globalThreadPool = null;
          }
       }
@@ -186,18 +182,19 @@ public final class ActiveMQClient {
                globalScheduledThreadPool.shutdownNow();
                ActiveMQClientLogger.LOGGER.warn("Couldn't finish the client scheduled in less than 10 seconds, interrupting it now");
             }
-         }
-         catch (InterruptedException e) {
+         } catch (InterruptedException e) {
             throw new ActiveMQInterruptedException(e);
-         }
-         finally {
+         } finally {
             globalScheduledThreadPool = null;
          }
       }
    }
 
-   /** Warning: This method has to be called before any clients or servers is started on the JVM otherwise previous ServerLocator would be broken after this call. */
-   public static synchronized void injectPools(ExecutorService globalThreadPool, ScheduledExecutorService scheduledThreadPool) {
+   /**
+    * Warning: This method has to be called before any clients or servers is started on the JVM otherwise previous ServerLocator would be broken after this call.
+    */
+   public static synchronized void injectPools(ExecutorService globalThreadPool,
+                                               ScheduledExecutorService scheduledThreadPool) {
       if (globalThreadPool == null || scheduledThreadPool == null)
          throw new IllegalArgumentException("thread pools must not be null");
 
@@ -220,8 +217,7 @@ public final class ActiveMQClient {
 
          if (globalThreadPoolSize == -1) {
             globalThreadPool = new ThreadPoolExecutor(0, Integer.MAX_VALUE, 60L, TimeUnit.SECONDS, new SynchronousQueue<Runnable>(), factory);
-         }
-         else {
+         } else {
             globalThreadPool = new ActiveMQThreadPoolExecutor(0, ActiveMQClient.globalThreadPoolSize, 60L, TimeUnit.SECONDS, factory);
          }
       }
@@ -237,7 +233,7 @@ public final class ActiveMQClient {
             }
          });
 
-         globalScheduledThreadPool =  new ScheduledThreadPoolExecutor(ActiveMQClient.globalScheduledThreadPoolSize, factory);
+         globalScheduledThreadPool = new ScheduledThreadPoolExecutor(ActiveMQClient.globalScheduledThreadPoolSize, factory);
       }
       return globalScheduledThreadPool;
    }
@@ -279,7 +275,8 @@ public final class ActiveMQClient {
     */
    public static void setGlobalThreadPoolProperties(int globalThreadMaxPoolSize, int globalScheduledThreadPoolSize) {
 
-      if (globalThreadMaxPoolSize < 2 && globalThreadMaxPoolSize != -1) globalThreadMaxPoolSize = 2;
+      if (globalThreadMaxPoolSize < 2 && globalThreadMaxPoolSize != -1)
+         globalThreadMaxPoolSize = 2;
 
       ActiveMQClient.globalScheduledThreadPoolSize = globalScheduledThreadPoolSize;
       ActiveMQClient.globalThreadPoolSize = globalThreadMaxPoolSize;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientMessage.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientMessage.java
index d2f58a6..e87d365 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/ClientMessage.java
@@ -20,8 +20,8 @@ import java.io.InputStream;
 import java.io.OutputStream;
 
 import org.apache.activemq.artemis.api.core.ActiveMQException;
-import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.api.core.Message;
+import org.apache.activemq.artemis.api.core.SimpleString;
 
 /**
  * A ClientMessage represents a message sent and/or received by ActiveMQ Artemis.

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/TopologyMember.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/TopologyMember.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/TopologyMember.java
index 4247b43..1ea039e 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/TopologyMember.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/TopologyMember.java
@@ -92,6 +92,5 @@ public interface TopologyMember {
     */
    boolean isMember(TransportConfiguration configuration);
 
-
    String toURI();
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RoundRobinConnectionLoadBalancingPolicy.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RoundRobinConnectionLoadBalancingPolicy.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RoundRobinConnectionLoadBalancingPolicy.java
index 58694b6..388cf34 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RoundRobinConnectionLoadBalancingPolicy.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/client/loadbalance/RoundRobinConnectionLoadBalancingPolicy.java
@@ -42,8 +42,7 @@ public final class RoundRobinConnectionLoadBalancingPolicy implements Connection
          pos = RandomUtil.randomInterval(0, max);
 
          first = false;
-      }
-      else {
+      } else {
          pos++;
 
          if (pos >= max) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelWrapper.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelWrapper.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelWrapper.java
index e83a33d..5baec23 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelWrapper.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JChannelWrapper.java
@@ -31,6 +31,7 @@ import org.jgroups.ReceiverAdapter;
  * will be disconnected.
  */
 public class JChannelWrapper {
+
    private static final Logger logger = Logger.getLogger(JChannelWrapper.class);
 
    private boolean connected = false;
@@ -46,7 +47,6 @@ public class JChannelWrapper {
       this.channel = channel;
       this.manager = manager;
 
-
       if (logger.isTraceEnabled() && channel.getReceiver() != null) {
          logger.trace(this + "The channel already had a receiver previously!!!! == " + channel.getReceiver(), new Exception("trace"));
       }
@@ -83,7 +83,8 @@ public class JChannelWrapper {
 
    public synchronized void close(boolean closeWrappedChannel) {
       refCount--;
-      if (logger.isTraceEnabled()) logger.trace(this + "::RefCount-- " + refCount + " on channel " + channelName, new Exception("Trace"));
+      if (logger.isTraceEnabled())
+         logger.trace(this + "::RefCount-- " + refCount + " on channel " + channelName, new Exception("Trace"));
       if (refCount == 0) {
          if (closeWrappedChannel) {
             closeChannel();
@@ -102,7 +103,8 @@ public class JChannelWrapper {
    }
 
    public void removeReceiver(JGroupsReceiver receiver) {
-      if (logger.isTraceEnabled()) logger.trace(this + "::removeReceiver: " + receiver + " on "  + channelName, new Exception("Trace"));
+      if (logger.isTraceEnabled())
+         logger.trace(this + "::removeReceiver: " + receiver + " on " + channelName, new Exception("Trace"));
       synchronized (receivers) {
          receivers.remove(receiver);
       }
@@ -127,13 +129,15 @@ public class JChannelWrapper {
 
    public void addReceiver(JGroupsReceiver jGroupsReceiver) {
       synchronized (receivers) {
-         if (logger.isTraceEnabled()) logger.trace(this + "::Add Receiver: " + jGroupsReceiver + " on " + channelName);
+         if (logger.isTraceEnabled())
+            logger.trace(this + "::Add Receiver: " + jGroupsReceiver + " on " + channelName);
          receivers.add(jGroupsReceiver);
       }
    }
 
    public void send(org.jgroups.Message msg) throws Exception {
-      if (logger.isTraceEnabled()) logger.trace(this + "::Sending JGroups Message: Open=" + channel.isOpen() + " on channel " + channelName + " msg=" + msg);
+      if (logger.isTraceEnabled())
+         logger.trace(this + "::Sending JGroups Message: Open=" + channel.isOpen() + " on channel " + channelName + " msg=" + msg);
       if (!manager.isLoopbackMessages()) {
          msg.setTransientFlag(Message.TransientFlag.DONT_LOOPBACK);
       }
@@ -142,7 +146,8 @@ public class JChannelWrapper {
 
    public JChannelWrapper addRef() {
       this.refCount++;
-      if (logger.isTraceEnabled()) logger.trace(this + "::RefCount++ = " + refCount + " on channel " + channelName);
+      if (logger.isTraceEnabled())
+         logger.trace(this + "::RefCount++ = " + refCount + " on channel " + channelName);
       return this;
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JGroupsReceiver.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JGroupsReceiver.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JGroupsReceiver.java
index c49caf0..e114569 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JGroupsReceiver.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/jgroups/JGroupsReceiver.java
@@ -36,7 +36,8 @@ public class JGroupsReceiver extends ReceiverAdapter {
 
    @Override
    public void receive(org.jgroups.Message msg) {
-      if (logger.isTraceEnabled()) logger.trace("sending message " + msg);
+      if (logger.isTraceEnabled())
+         logger.trace("sending message " + msg);
       dequeue.add(msg.getBuffer());
    }
 
@@ -52,8 +53,7 @@ public class JGroupsReceiver extends ReceiverAdapter {
    private void logBytes(String methodName, byte[] bytes) {
       if (bytes != null) {
          logger.trace(methodName + "::" + bytes.length + " bytes");
-      }
-      else {
+      } else {
          logger.trace(methodName + ":: no bytes");
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AddressSettingsInfo.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AddressSettingsInfo.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AddressSettingsInfo.java
index 062ba46..b182470 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AddressSettingsInfo.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/AddressSettingsInfo.java
@@ -16,10 +16,10 @@
  */
 package org.apache.activemq.artemis.api.core.management;
 
-import org.apache.activemq.artemis.api.core.JsonUtil;
-
 import javax.json.JsonObject;
 
+import org.apache.activemq.artemis.api.core.JsonUtil;
+
 // XXX no javadocs
 public final class AddressSettingsInfo {
 
@@ -67,19 +67,7 @@ public final class AddressSettingsInfo {
 
    public static AddressSettingsInfo from(final String jsonString) {
       JsonObject object = JsonUtil.readJsonObject(jsonString);
-      return new AddressSettingsInfo(object.getString("addressFullMessagePolicy"),
-            object.getJsonNumber("maxSizeBytes").longValue(), object.getInt("pageSizeBytes"), object.getInt("pageCacheMaxSize"),
-            object.getInt("maxDeliveryAttempts"),
-            object.getJsonNumber("redeliveryDelay").longValue(),
-            object.getJsonNumber("redeliveryMultiplier").doubleValue(),
-            object.getJsonNumber("maxRedeliveryDelay").longValue(),
-            object.getString("DLA"), object.getString("expiryAddress"), object.getBoolean("lastValueQueue"),
-            object.getJsonNumber("redistributionDelay").longValue(), object.getBoolean("sendToDLAOnNoRoute"),
-            object.getJsonNumber("slowConsumerThreshold").longValue(),
-            object.getJsonNumber("slowConsumerCheckPeriod").longValue(),
-            object.getString("slowConsumerPolicy"), object.getBoolean("autoCreateJmsQueues"),
-            object.getBoolean("autoDeleteJmsQueues"), object.getBoolean("autoCreateJmsTopics"),
-            object.getBoolean("autoDeleteJmsTopics"));
+      return new AddressSettingsInfo(object.getString("addressFullMessagePolicy"), object.getJsonNumber("maxSizeBytes").longValue(), object.getInt("pageSizeBytes"), object.getInt("pageCacheMaxSize"), object.getInt("maxDeliveryAttempts"), object.getJsonNumber("redeliveryDelay").longValue(), object.getJsonNumber("redeliveryMultiplier").doubleValue(), object.getJsonNumber("maxRedeliveryDelay").longValue(), object.getString("DLA"), object.getString("expiryAddress"), object.getBoolean("lastValueQueue"), object.getJsonNumber("redistributionDelay").longValue(), object.getBoolean("sendToDLAOnNoRoute"), object.getJsonNumber("slowConsumerThreshold").longValue(), object.getJsonNumber("slowConsumerCheckPeriod").longValue(), object.getString("slowConsumerPolicy"), object.getBoolean("autoCreateJmsQueues"), object.getBoolean("autoDeleteJmsQueues"), object.getBoolean("autoCreateJmsTopics"), object.getBoolean("autoDeleteJmsTopics"));
    }
 
    // Constructors --------------------------------------------------

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/Attribute.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/Attribute.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/Attribute.java
index 9682dd9..824b2f7 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/Attribute.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/Attribute.java
@@ -30,5 +30,6 @@ import java.lang.annotation.Target;
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.METHOD)
 public @interface Attribute {
+
    String desc() default "";
 }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/DayCounterInfo.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/DayCounterInfo.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/DayCounterInfo.java
index 16fa907..4cb124b 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/DayCounterInfo.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/DayCounterInfo.java
@@ -16,14 +16,14 @@
  */
 package org.apache.activemq.artemis.api.core.management;
 
-import org.apache.activemq.artemis.api.core.JsonUtil;
-import org.apache.activemq.artemis.utils.JsonLoader;
-
 import javax.json.JsonArray;
 import javax.json.JsonArrayBuilder;
 import javax.json.JsonObject;
 import javax.json.JsonObjectBuilder;
 
+import org.apache.activemq.artemis.api.core.JsonUtil;
+import org.apache.activemq.artemis.utils.JsonLoader;
+
 /**
  * Helper class to create Java Objects from the
  * JSON serialization returned by {@link QueueControl#listMessageCounterHistory()}.
@@ -44,9 +44,7 @@ public final class DayCounterInfo {
          for (int c : info.getCounters()) {
             counter.add(c);
          }
-         JsonObjectBuilder dci = JsonLoader.createObjectBuilder()
-            .add("date", info.getDate())
-            .add("counters", counter);
+         JsonObjectBuilder dci = JsonLoader.createObjectBuilder().add("date", info.getDate()).add("counters", counter);
          counters.add(dci);
       }
       json.add("dayCounters", counters);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ManagementHelper.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ManagementHelper.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ManagementHelper.java
index 78405b0..40211c1 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ManagementHelper.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ManagementHelper.java
@@ -16,12 +16,12 @@
  */
 package org.apache.activemq.artemis.api.core.management;
 
+import javax.json.JsonArray;
+
 import org.apache.activemq.artemis.api.core.JsonUtil;
 import org.apache.activemq.artemis.api.core.Message;
 import org.apache.activemq.artemis.api.core.SimpleString;
 
-import javax.json.JsonArray;
-
 /**
  * Helper class to use ActiveMQ Artemis Core messages to manage server resources.
  */
@@ -130,8 +130,7 @@ public final class ManagementHelper {
          JsonArray jsonArray = JsonUtil.toJSONArray(parameters);
 
          paramString = jsonArray.toString();
-      }
-      else {
+      } else {
          paramString = null;
       }
 
@@ -149,8 +148,7 @@ public final class ManagementHelper {
          JsonArray jsonArray = JsonUtil.readJsonArray(jsonString);
 
          return JsonUtil.fromJsonArray(jsonArray);
-      }
-      else {
+      } else {
          return null;
       }
    }
@@ -181,8 +179,7 @@ public final class ManagementHelper {
          JsonArray jsonArray = JsonUtil.toJSONArray(new Object[]{result});
 
          resultString = jsonArray.toString();
-      }
-      else {
+      } else {
          resultString = null;
       }
 
@@ -202,8 +199,7 @@ public final class ManagementHelper {
       if (jsonString != null) {
          JsonArray jsonArray = JsonUtil.readJsonArray(jsonString);
          return JsonUtil.fromJsonArray(jsonArray);
-      }
-      else {
+      } else {
          return null;
       }
    }
@@ -218,19 +214,18 @@ public final class ManagementHelper {
       return getResult(message, null);
    }
 
-      /**
-       * Returns the result of an operation invocation or an attribute value.
-       * <br>
-       * If an error occurred on the server, {@link #hasOperationSucceeded(Message)} will return {@code false}.
-       * and the result will be a String corresponding to the server exception.
-       */
+   /**
+    * Returns the result of an operation invocation or an attribute value.
+    * <br>
+    * If an error occurred on the server, {@link #hasOperationSucceeded(Message)} will return {@code false}.
+    * and the result will be a String corresponding to the server exception.
+    */
    public static Object getResult(final Message message, Class desiredType) throws Exception {
       Object[] res = ManagementHelper.getResults(message);
 
       if (res != null) {
          return JsonUtil.convertJsonValue(res[0], desiredType);
-      }
-      else {
+      } else {
          return null;
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ObjectNameBuilder.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ObjectNameBuilder.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ObjectNameBuilder.java
index fd3d718..ef7b483 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ObjectNameBuilder.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/ObjectNameBuilder.java
@@ -18,8 +18,8 @@ package org.apache.activemq.artemis.api.core.management;
 
 import javax.management.ObjectName;
 
-import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.api.config.ActiveMQDefaultConfiguration;
+import org.apache.activemq.artemis.api.core.SimpleString;
 
 /**
  * Helper class to build ObjectNames for ActiveMQ Artemis resources.
@@ -50,8 +50,7 @@ public final class ObjectNameBuilder {
    public static ObjectNameBuilder create(final String domain) {
       if (domain == null) {
          return new ObjectNameBuilder(ActiveMQDefaultConfiguration.getDefaultJmxDomain(), null, false);
-      }
-      else {
+      } else {
          return new ObjectNameBuilder(domain, null, false);
       }
    }
@@ -59,8 +58,7 @@ public final class ObjectNameBuilder {
    public static ObjectNameBuilder create(final String domain, String brokerName) {
       if (domain == null) {
          return new ObjectNameBuilder(ActiveMQDefaultConfiguration.getDefaultJmxDomain(), brokerName, true);
-      }
-      else {
+      } else {
          return new ObjectNameBuilder(domain, brokerName, true);
       }
    }
@@ -68,8 +66,7 @@ public final class ObjectNameBuilder {
    public static ObjectNameBuilder create(final String domain, String brokerName, boolean jmxUseBrokerName) {
       if (domain == null) {
          return new ObjectNameBuilder(ActiveMQDefaultConfiguration.getDefaultJmxDomain(), brokerName, jmxUseBrokerName);
-      }
-      else {
+      } else {
          return new ObjectNameBuilder(domain, brokerName, jmxUseBrokerName);
       }
    }
@@ -197,8 +194,7 @@ public final class ObjectNameBuilder {
    private String getBrokerProperties() {
       if (jmxUseBrokerName && brokerName != null) {
          return String.format("type=Broker,brokerName=%s,", ObjectName.quote(brokerName));
-      }
-      else {
+      } else {
          return "";
       }
    }
@@ -206,8 +202,7 @@ public final class ObjectNameBuilder {
    private String getObjectType() {
       if (jmxUseBrokerName && brokerName != null) {
          return "serviceType";
-      }
-      else {
+      } else {
          return "type";
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/Operation.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/Operation.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/Operation.java
index 5495f5a..9e03b11 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/Operation.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/Operation.java
@@ -16,14 +16,13 @@
  */
 package org.apache.activemq.artemis.api.core.management;
 
+import javax.management.MBeanOperationInfo;
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Inherited;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
-import javax.management.MBeanOperationInfo;
-
 /**
  * Info for a MBean Operation.
  * <p>

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java
index 60957ad..0a74d1c 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/QueueControl.java
@@ -246,7 +246,6 @@ public interface QueueControl {
    @Operation(desc = "Remove the message corresponding to the given messageID", impact = MBeanOperationInfo.ACTION)
    boolean expireMessage(@Parameter(name = "messageID", desc = "A message ID") long messageID) throws Exception;
 
-
    /**
     * Retries the message corresponding to the given messageID to the original queue.
     * This is appropriate on dead messages on Dead letter queues only.
@@ -336,14 +335,13 @@ public interface QueueControl {
    int sendMessagesToDeadLetterAddress(@Parameter(name = "filter", desc = "A message filter (can be empty)") String filterStr) throws Exception;
 
    /**
-    *
-    * @param headers the message headers and properties to set. Can only
-    *                container Strings maped to primitive types.
-    * @param body the text to send
+    * @param headers  the message headers and properties to set. Can only
+    *                 container Strings maped to primitive types.
+    * @param body     the text to send
     * @param userID
     * @param durable
-    *@param user
-    * @param password   @return
+    * @param user
+    * @param password @return
     * @throws Exception
     */
    @Operation(desc = "Sends a TextMessage to a password-protected destination.", impact = MBeanOperationInfo.ACTION)
@@ -355,7 +353,6 @@ public interface QueueControl {
                       @Parameter(name = "user", desc = "The user to authenticate with") String user,
                       @Parameter(name = "password", desc = "The users password to authenticate with") String password) throws Exception;
 
-
    /**
     * Changes the message's priority corresponding to the specified message ID to the specified priority.
     *

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/RoleInfo.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/RoleInfo.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/RoleInfo.java
index 01be093..d3fc9db 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/RoleInfo.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/api/core/management/RoleInfo.java
@@ -16,11 +16,11 @@
  */
 package org.apache.activemq.artemis.api.core.management;
 
-import org.apache.activemq.artemis.api.core.JsonUtil;
-
 import javax.json.JsonArray;
 import javax.json.JsonObject;
 
+import org.apache.activemq.artemis.api.core.JsonUtil;
+
 /**
  * Helper class to create Java Objects from the
  * JSON serialization returned by {@link AddressControl#getRolesAsJSON()}.
@@ -54,10 +54,7 @@ public final class RoleInfo {
       RoleInfo[] roles = new RoleInfo[array.size()];
       for (int i = 0; i < array.size(); i++) {
          JsonObject r = array.getJsonObject(i);
-         RoleInfo role = new RoleInfo(r.getString("name"), r.getBoolean("send"),
-               r.getBoolean("consume"), r.getBoolean("createDurableQueue"),
-               r.getBoolean("deleteDurableQueue"), r.getBoolean("createNonDurableQueue"),
-               r.getBoolean("deleteNonDurableQueue"), r.getBoolean("manage"), r.getBoolean("browse"));
+         RoleInfo role = new RoleInfo(r.getString("name"), r.getBoolean("send"), r.getBoolean("consume"), r.getBoolean("createDurableQueue"), r.getBoolean("deleteDurableQueue"), r.getBoolean("createNonDurableQueue"), r.getBoolean("deleteNonDurableQueue"), r.getBoolean("manage"), r.getBoolean("browse"));
          roles[i] = role;
       }
       return roles;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientMessageBundle.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientMessageBundle.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientMessageBundle.java
index 08f51ae..4a4a9a3 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientMessageBundle.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/ActiveMQClientMessageBundle.java
@@ -32,10 +32,10 @@ import org.apache.activemq.artemis.api.core.ActiveMQTransactionRolledBackExcepti
 import org.apache.activemq.artemis.api.core.ActiveMQUnBlockedException;
 import org.apache.activemq.artemis.core.cluster.DiscoveryGroup;
 import org.apache.activemq.artemis.spi.core.remoting.Connection;
+import org.jboss.logging.Messages;
 import org.jboss.logging.annotations.Cause;
 import org.jboss.logging.annotations.Message;
 import org.jboss.logging.annotations.MessageBundle;
-import org.jboss.logging.Messages;
 import org.w3c.dom.Node;
 
 /**

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientConsumerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientConsumerImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientConsumerImpl.java
index 42168e9..f937c40 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientConsumerImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientConsumerImpl.java
@@ -253,14 +253,13 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
                      }
                   }
 
-                  if ( m != null) {
+                  if (m != null) {
                      session.workDone();
                   }
 
                   try {
                      wait(toWait);
-                  }
-                  catch (InterruptedException e) {
+                  } catch (InterruptedException e) {
                      throw new ActiveMQInterruptedException(e);
                   }
 
@@ -287,8 +286,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
                   deliveryForced = false;
                   toWait = timeout == 0 ? Long.MAX_VALUE : timeout;
                   continue;
-               }
-               else {
+               } else {
                   if (logger.isTraceEnabled()) {
                      logger.trace(this + "::receive(" + timeout + ", " + forcingDelivery + ") -> failedOver, but m != null, being " + m);
                   }
@@ -324,8 +322,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
                      }
 
                      return null;
-                  }
-                  else {
+                  } else {
                      if (logger.isTraceEnabled()) {
                         logger.trace(this + "::Ignored force delivery answer as it belonged to another call");
                      }
@@ -349,8 +346,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
 
                   if (toWait > 0) {
                      continue;
-                  }
-                  else {
+                  } else {
                      return null;
                   }
                }
@@ -364,8 +360,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
                }
 
                return m;
-            }
-            else {
+            } else {
                if (logger.isTraceEnabled()) {
                   logger.trace(this + "::Returning null");
                }
@@ -373,8 +368,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
                return null;
             }
          }
-      }
-      finally {
+      } finally {
          receiverThread = null;
       }
    }
@@ -439,9 +433,8 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
       // if no previous handler existed queue up messages for delivery
       if (handler != null && noPreviousHandler) {
          requeueExecutors();
-      }
-      // if unsetting a previous handler may be in onMessage so wait for completion
-      else if (handler == null && !noPreviousHandler) {
+      } else if (handler == null && !noPreviousHandler) {
+         // if unsetting a previous handler may be in onMessage so wait for completion
          waitForOnMessageToComplete(true);
       }
 
@@ -480,8 +473,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
    public void cleanUp() {
       try {
          doCleanUp(false);
-      }
-      catch (ActiveMQException e) {
+      } catch (ActiveMQException e) {
          ActiveMQClientLogger.LOGGER.warn("problem cleaning up: " + this);
       }
    }
@@ -574,8 +566,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
 
       if (message.getBooleanProperty(Message.HDR_LARGE_COMPRESSED)) {
          handleCompressedMessage(message);
-      }
-      else {
+      } else {
          handleRegularMessage(message);
       }
    }
@@ -602,8 +593,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
          if (!stopped) {
             queueExecutor();
          }
-      }
-      else {
+      } else {
          notify();
       }
    }
@@ -673,8 +663,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
 
       if (clientLargeMessage.isCompressed()) {
          clientLargeMessage.setLargeMessageController(new CompressedLargeMessageControllerImpl(currentLargeMessageController));
-      }
-      else {
+      } else {
          clientLargeMessage.setLargeMessageController(currentLargeMessageController);
       }
 
@@ -693,8 +682,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
             logger.trace(this + "::Sending back credits for largeController = null " + flowControlSize);
          }
          flowControl(flowControlSize, false);
-      }
-      else {
+      } else {
          currentLargeMessageController.addPacket(chunk, flowControlSize, isContinues);
       }
    }
@@ -716,8 +704,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
                }
 
                flowControlBeforeConsumption(message);
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                ActiveMQClientLogger.LOGGER.errorClearingMessages(e);
             }
          }
@@ -726,8 +713,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
 
          try {
             resetLargeMessageController();
-         }
-         catch (Throwable e) {
+         } catch (Throwable e) {
             // nothing that could be done here
             ActiveMQClientLogger.LOGGER.errorClearingMessages(e);
          }
@@ -763,8 +749,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
 
       if (ackIndividually) {
          individualAcknowledge(message);
-      }
-      else {
+      } else {
 
          ackBytes += message.getEncodeSize();
 
@@ -777,8 +762,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
                logger.trace(this + ":: acknowledge acking " + cmi);
             }
             doAck(cmi);
-         }
-         else {
+         } else {
             if (logger.isTraceEnabled()) {
                logger.trace(this + ":: acknowledge setting lastAckedMessage = " + cmi);
             }
@@ -832,8 +816,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
                if (credits > 0) {
                   sendCredits(credits);
                }
-            }
-            else {
+            } else {
                if (logger.isDebugEnabled()) {
                   logger.debug("Sending " + messageBytes + " from flow-control");
                }
@@ -875,8 +858,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
          // However when starting a slow consumer, we have to guarantee the credit was sent before we can perform any
          // operations like forceDelivery
          pendingFlowControl.await(10, TimeUnit.SECONDS);
-      }
-      catch (InterruptedException e) {
+      } catch (InterruptedException e) {
          // will just ignore and forward the ignored
          Thread.currentThread().interrupt();
       }
@@ -897,8 +879,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
 
          try {
             latch.await(10, TimeUnit.SECONDS);
-         }
-         catch (InterruptedException e) {
+         } catch (InterruptedException e) {
             throw new ActiveMQInterruptedException(e);
          }
       }
@@ -928,8 +909,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
          public void run() {
             try {
                sessionContext.sendConsumerCredits(ClientConsumerImpl.this, credits);
-            }
-            finally {
+            } finally {
                pendingFlowControl.countDown();
             }
          }
@@ -1019,8 +999,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
                onMessageThread = Thread.currentThread();
                try {
                   theHandler.onMessage(message);
-               }
-               finally {
+               } finally {
                   try {
                      AccessController.doPrivileged(new PrivilegedAction<Object>() {
                         @Override
@@ -1029,8 +1008,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
                            return null;
                         }
                      });
-                  }
-                  catch (Exception e) {
+                  } catch (Exception e) {
                      ActiveMQClientLogger.LOGGER.warn(e.getMessage(), e);
                   }
 
@@ -1044,8 +1022,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
                if (message.isLargeMessage()) {
                   message.discardBody();
                }
-            }
-            else {
+            } else {
                session.expire(this, message);
             }
 
@@ -1105,8 +1082,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
          if (sendCloseMessage) {
             sessionContext.closeConsumer(this);
          }
-      }
-      catch (Throwable t) {
+      } catch (Throwable t) {
          // Consumer close should always return without exception
       }
 
@@ -1146,8 +1122,7 @@ public final class ClientConsumerImpl implements ClientConsumerInternal {
       public void run() {
          try {
             callOnMessage();
-         }
-         catch (Exception e) {
+         } catch (Exception e) {
             ActiveMQClientLogger.LOGGER.onMessageError(e);
 
             lastException = e;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientLargeMessageImpl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientLargeMessageImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientLargeMessageImpl.java
index b30df3f..c3cbceb 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientLargeMessageImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientLargeMessageImpl.java
@@ -61,8 +61,7 @@ public final class ClientLargeMessageImpl extends ClientMessageImpl implements C
    public int getEncodeSize() {
       if (bodyBuffer != null) {
          return super.getEncodeSize();
-      }
-      else {
+      } else {
          return DataConstants.SIZE_INT + DataConstants.SIZE_INT + getHeadersAndPropertiesEncodeSize();
       }
    }
@@ -90,8 +89,7 @@ public final class ClientLargeMessageImpl extends ClientMessageImpl implements C
 
       try {
          checkBuffer();
-      }
-      catch (ActiveMQException e) {
+      } catch (ActiveMQException e) {
          throw new RuntimeException(e.getMessage(), e);
       }
 
@@ -113,8 +111,7 @@ public final class ClientLargeMessageImpl extends ClientMessageImpl implements C
       if (bodyBuffer != null) {
          // The body was rebuilt on the client, so we need to behave as a regular message on this case
          super.saveToOutputStream(out);
-      }
-      else {
+      } else {
          largeMessageController.saveBuffer(out);
       }
    }
@@ -123,8 +120,7 @@ public final class ClientLargeMessageImpl extends ClientMessageImpl implements C
    public ClientLargeMessageImpl setOutputStream(final OutputStream out) throws ActiveMQException {
       if (bodyBuffer != null) {
          super.setOutputStream(out);
-      }
-      else {
+      } else {
          largeMessageController.setOutputStream(out);
       }
 
@@ -135,8 +131,7 @@ public final class ClientLargeMessageImpl extends ClientMessageImpl implements C
    public boolean waitOutputStreamCompletion(final long timeMilliseconds) throws ActiveMQException {
       if (bodyBuffer != null) {
          return super.waitOutputStreamCompletion(timeMilliseconds);
-      }
-      else {
+      } else {
          return largeMessageController.waitCompletion(timeMilliseconds);
       }
    }
@@ -145,8 +140,7 @@ public final class ClientLargeMessageImpl extends ClientMessageImpl implements C
    public void discardBody() {
       if (bodyBuffer != null) {
          super.discardBody();
-      }
-      else {
+      } else {
          largeMessageController.discardUnusedPackets();
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientMessageImpl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientMessageImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientMessageImpl.java
index a6a2231..7bf8eb7 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientMessageImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientMessageImpl.java
@@ -151,8 +151,7 @@ public class ClientMessageImpl extends MessageImpl implements ClientMessageInter
          getBodyBuffer().readBytes(readBuffer);
          out.write(readBuffer);
          out.flush();
-      }
-      catch (IOException e) {
+      } catch (IOException e) {
          throw ActiveMQClientMessageBundle.BUNDLE.errorSavingBody(e);
       }
    }
@@ -334,8 +333,7 @@ public class ClientMessageImpl extends MessageImpl implements ClientMessageInter
       public long getLargeBodySize() {
          if (isLargeMessage()) {
             return getBodyBuffer().writerIndex();
-         }
-         else {
+         } else {
             return getBodyBuffer().writerIndex() - BODY_OFFSET;
          }
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerCreditManagerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerCreditManagerImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerCreditManagerImpl.java
index 32ada4f..80b255f 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerCreditManagerImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientProducerCreditManagerImpl.java
@@ -47,8 +47,7 @@ public class ClientProducerCreditManagerImpl implements ClientProducerCreditMana
                                                         SessionContext context) {
       if (windowSize == -1) {
          return ClientProducerCreditsNoFlowControl.instance;
-      }
-      else {
+      } else {
          boolean needInit = false;
          ClientProducerCredits credits;
 
@@ -68,8 +67,7 @@ public class ClientProducerCreditManagerImpl implements ClientProducerCreditMana
 
                // Remove from anon credits (if there)
                unReferencedCredits.remove(address);
-            }
-            else {
+            } else {
                addToUnReferencedCache(address, credits);
             }
          }
@@ -171,7 +169,7 @@ public class ClientProducerCreditManagerImpl implements ClientProducerCreditMana
       static ClientProducerCreditsNoFlowControl instance = new ClientProducerCreditsNoFlowControl();
 
       @Override
-      public void acquireCredits(int credits)  {
+      public void acquireCredits(int credits) {
       }
 
       @Override


Mime
View raw message