activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From martyntay...@apache.org
Subject [07/52] [partial] activemq-artemis git commit: ARTEMIS-765 Improve Checkstyle
Date Fri, 30 Sep 2016 15:26:07 GMT
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jmx/JmxCreateNCTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jmx/JmxCreateNCTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jmx/JmxCreateNCTest.java
index 450ef33..c6738fa 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jmx/JmxCreateNCTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jmx/JmxCreateNCTest.java
@@ -16,13 +16,13 @@
  */
 package org.apache.activemq.jmx;
 
+import javax.management.ObjectName;
+
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.jmx.BrokerViewMBean;
 import org.apache.activemq.broker.jmx.NetworkConnectorViewMBean;
 import org.junit.Test;
 
-import javax.management.ObjectName;
-
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jmx/OpenTypeSupportTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jmx/OpenTypeSupportTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jmx/OpenTypeSupportTest.java
index 1f71e14..818b9f2 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jmx/OpenTypeSupportTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jmx/OpenTypeSupportTest.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,
@@ -81,8 +81,7 @@ public class OpenTypeSupportTest {
          toSend.writeBytes(BYTESMESSAGE_TEXT.getBytes());
          MessageProducer producer = session.createProducer(queue);
          producer.send(queue, toSend);
-      }
-      finally {
+      } finally {
          conn.close();
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/ActiveMQInitialContextFactoryTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/ActiveMQInitialContextFactoryTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/ActiveMQInitialContextFactoryTest.java
index 8690472..247b8dc 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/ActiveMQInitialContextFactoryTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/ActiveMQInitialContextFactoryTest.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/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/ActiveMQWASInitialContextFactoryTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/ActiveMQWASInitialContextFactoryTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/ActiveMQWASInitialContextFactoryTest.java
index a89c94c..922bd13 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/ActiveMQWASInitialContextFactoryTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/ActiveMQWASInitialContextFactoryTest.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,
@@ -16,9 +16,8 @@
  */
 package org.apache.activemq.jndi;
 
-import java.util.Hashtable;
-
 import javax.naming.Context;
+import java.util.Hashtable;
 
 public class ActiveMQWASInitialContextFactoryTest extends JNDITestSupport {
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/CustomConnectionFactoryNameTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/CustomConnectionFactoryNameTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/CustomConnectionFactoryNameTest.java
index 2395974..cf8b3c6 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/CustomConnectionFactoryNameTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/CustomConnectionFactoryNameTest.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/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/DestinationNameWithSlashTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/DestinationNameWithSlashTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/DestinationNameWithSlashTest.java
index 8bdf227..223fb7d 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/DestinationNameWithSlashTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/DestinationNameWithSlashTest.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/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/InitialContextTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/InitialContextTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/InitialContextTest.java
index 575ab88..adffb4a 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/InitialContextTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/InitialContextTest.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,
@@ -16,10 +16,9 @@
  */
 package org.apache.activemq.jndi;
 
-import java.util.Properties;
-
 import javax.naming.Context;
 import javax.naming.InitialContext;
+import java.util.Properties;
 
 import junit.framework.TestCase;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/JNDITestSupport.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/JNDITestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/JNDITestSupport.java
index a00ffee..bbb5853 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/JNDITestSupport.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/JNDITestSupport.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,
@@ -16,8 +16,6 @@
  */
 package org.apache.activemq.jndi;
 
-import java.util.Hashtable;
-
 import javax.jms.ConnectionFactory;
 import javax.jms.Destination;
 import javax.jms.JMSException;
@@ -26,6 +24,7 @@ import javax.naming.Context;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
 import javax.naming.spi.InitialContextFactory;
+import java.util.Hashtable;
 
 import junit.framework.TestCase;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/ObjectFactoryTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/ObjectFactoryTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/ObjectFactoryTest.java
index d322278..e6855be 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/ObjectFactoryTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/ObjectFactoryTest.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/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/XAConnectionFactoryTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/XAConnectionFactoryTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/XAConnectionFactoryTest.java
index 801c475..5b205c0 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/XAConnectionFactoryTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/jndi/XAConnectionFactoryTest.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/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/joramtests/ActiveMQAdmin.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/joramtests/ActiveMQAdmin.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/joramtests/ActiveMQAdmin.java
index b3383f3..de226d5 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/joramtests/ActiveMQAdmin.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/joramtests/ActiveMQAdmin.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,
@@ -16,14 +16,13 @@
  */
 package org.apache.activemq.joramtests;
 
-import java.io.File;
-import java.net.URI;
-import java.util.Hashtable;
-
 import javax.jms.ConnectionFactory;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
+import java.io.File;
+import java.net.URI;
+import java.util.Hashtable;
 
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.BrokerFactory;
@@ -46,8 +45,7 @@ public class ActiveMQAdmin implements Admin {
          env.put("java.naming.factory.initial", "org.eclipse.jetty.jndi.InitialContextFactory");
          env.put("java.naming.factory.url.pkgs", "org.eclipse.jetty.jndi");
          context = new InitialContext(env);
-      }
-      catch (NamingException e) {
+      } catch (NamingException e) {
          throw new RuntimeException(e);
       }
    }
@@ -95,8 +93,7 @@ public class ActiveMQAdmin implements Admin {
    public void createQueue(String name) {
       try {
          context.bind(name, new ActiveMQQueue(name));
-      }
-      catch (NamingException e) {
+      } catch (NamingException e) {
          throw new RuntimeException(e);
       }
    }
@@ -105,8 +102,7 @@ public class ActiveMQAdmin implements Admin {
    public void createTopic(String name) {
       try {
          context.bind(name, new ActiveMQTopic(name));
-      }
-      catch (NamingException e) {
+      } catch (NamingException e) {
          throw new RuntimeException(e);
       }
    }
@@ -116,8 +112,7 @@ public class ActiveMQAdmin implements Admin {
       // BrokerTestSupport.delete_queue((Broker)base.broker, name);
       try {
          context.unbind(name);
-      }
-      catch (NamingException e) {
+      } catch (NamingException e) {
          throw new RuntimeException(e);
       }
    }
@@ -126,8 +121,7 @@ public class ActiveMQAdmin implements Admin {
    public void deleteTopic(String name) {
       try {
          context.unbind(name);
-      }
-      catch (NamingException e) {
+      } catch (NamingException e) {
          throw new RuntimeException(e);
       }
    }
@@ -138,8 +132,7 @@ public class ActiveMQAdmin implements Admin {
          final ConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost");
          ((ActiveMQConnectionFactory) factory).setNestedMapAndListEnabled(false);
          context.bind(name, factory);
-      }
-      catch (NamingException e) {
+      } catch (NamingException e) {
          throw new RuntimeException(e);
       }
    }
@@ -148,8 +141,7 @@ public class ActiveMQAdmin implements Admin {
    public void deleteConnectionFactory(String name) {
       try {
          context.unbind(name);
-      }
-      catch (NamingException e) {
+      } catch (NamingException e) {
          throw new RuntimeException(e);
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/joramtests/JoramJmsTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/joramtests/JoramJmsTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/joramtests/JoramJmsTest.java
index 0955294..a15f32b 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/joramtests/JoramJmsTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/joramtests/JoramJmsTest.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/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/leveldb/LevelDBStoreBrokerTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/leveldb/LevelDBStoreBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/leveldb/LevelDBStoreBrokerTest.java
index 7854af0..6ec80f2 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/leveldb/LevelDBStoreBrokerTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/leveldb/LevelDBStoreBrokerTest.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,
@@ -16,15 +16,15 @@
  */
 package org.apache.activemq.leveldb;
 
+import java.io.File;
+import java.io.IOException;
+
 import junit.framework.Test;
 
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.BrokerTest;
 import org.apache.activemq.store.PersistenceAdapter;
 
-import java.io.File;
-import java.io.IOException;
-
 /**
  * @author <a href="http://hiramchirino.com">Hiram Chirino</a>
  */

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/leveldb/LevelDBXARecoveryBrokerTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/leveldb/LevelDBXARecoveryBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/leveldb/LevelDBXARecoveryBrokerTest.java
index ca1a72a..1c7b7f9 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/leveldb/LevelDBXARecoveryBrokerTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/leveldb/LevelDBXARecoveryBrokerTest.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,
@@ -45,8 +45,7 @@ public class LevelDBXARecoveryBrokerTest extends XARecoveryBrokerTest {
       try {
          File levelDbDir = new File(levelDbDirectoryName);
          FileUtils.deleteDirectory(levelDbDir);
-      }
-      catch (IOException e) {
+      } catch (IOException e) {
       }
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadClient.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadClient.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadClient.java
index 4a0146c..556f06d 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadClient.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadClient.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,
@@ -93,13 +93,11 @@ public class LoadClient implements Runnable {
             if (result != null) {
                send(result);
                rate.increment();
-            }
-            else if (running) {
+            } else if (running) {
                LOG.error(name + " Failed to consume!");
             }
          }
-      }
-      catch (Throwable e) {
+      } catch (Throwable e) {
          e.printStackTrace();
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadController.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadController.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadController.java
index 31ea4c1..78d93eb 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadController.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadController.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,
@@ -16,12 +16,11 @@
  */
 package org.apache.activemq.load;
 
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
 import javax.jms.ConnectionFactory;
 import javax.jms.Destination;
 import javax.jms.JMSException;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
 
 /**
  *
@@ -67,11 +66,9 @@ public class LoadController extends LoadClient {
                }
             }
          }
-      }
-      catch (Throwable e) {
+      } catch (Throwable e) {
          e.printStackTrace();
-      }
-      finally {
+      } finally {
          stopped.countDown();
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadTest.java
index 2d9443d..0eb45d2 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/load/LoadTest.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,
@@ -83,15 +83,13 @@ public class LoadTest extends TestCase {
          Destination inDestination = null;
          if (i == 0) {
             inDestination = startDestination;
-         }
-         else {
+         } else {
             inDestination = createDestination(managementSession, getClass() + ".client." + (i));
          }
          Destination outDestination = null;
          if (i == (numberOfClients - 1)) {
             outDestination = endDestination;
-         }
-         else {
+         } else {
             outDestination = createDestination(managementSession, getClass() + ".client." + (i + 1));
          }
          LoadClient client = new LoadClient("client(" + i + ")", factory);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/BoundaryStatisticTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/BoundaryStatisticTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/BoundaryStatisticTest.java
index 0ce7a01..f53a06e 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/BoundaryStatisticTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/BoundaryStatisticTest.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/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/BoundedRangeStatisticTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/BoundedRangeStatisticTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/BoundedRangeStatisticTest.java
index ded835b..1c5d497 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/BoundedRangeStatisticTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/BoundedRangeStatisticTest.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/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/CountStatisticTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/CountStatisticTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/CountStatisticTest.java
index 4c7a658..fff320d 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/CountStatisticTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/CountStatisticTest.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/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/RangeStatisticTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/RangeStatisticTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/RangeStatisticTest.java
index 887527e..a44dc61 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/RangeStatisticTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/RangeStatisticTest.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/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/StatisticTestSupport.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/StatisticTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/StatisticTestSupport.java
index 9e01f3d..c96287e 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/StatisticTestSupport.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/StatisticTestSupport.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/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/TimeStatisticTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/TimeStatisticTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/TimeStatisticTest.java
index b32f8ce..de20b19 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/TimeStatisticTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/management/TimeStatisticTest.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/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/MemoryPropertyTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/MemoryPropertyTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/MemoryPropertyTest.java
index 701f5e7..f4d904f 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/MemoryPropertyTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/MemoryPropertyTest.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/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/DummyMessage.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/DummyMessage.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/DummyMessage.java
index 368b971..74946b3 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/DummyMessage.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/DummyMessage.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/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java
index 9ddfc65..f7e0260 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/MemoryBufferTestSupport.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,
@@ -19,8 +19,6 @@ package org.apache.activemq.memory.buffer;
 import junit.framework.TestCase;
 
 import org.apache.activemq.command.ActiveMQMessage;
-import org.apache.activemq.memory.buffer.MessageBuffer;
-import org.apache.activemq.memory.buffer.MessageQueue;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/OrderBasedMemoryBufferTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/OrderBasedMemoryBufferTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/OrderBasedMemoryBufferTest.java
index b89b0a5..8ddf594 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/OrderBasedMemoryBufferTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/OrderBasedMemoryBufferTest.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,
@@ -16,9 +16,6 @@
  */
 package org.apache.activemq.memory.buffer;
 
-import org.apache.activemq.memory.buffer.MessageBuffer;
-import org.apache.activemq.memory.buffer.OrderBasedMessageBuffer;
-
 /**
  *
  *

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/SizeBasedMessageBufferTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/SizeBasedMessageBufferTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/SizeBasedMessageBufferTest.java
index ed7575e..2329c5f 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/SizeBasedMessageBufferTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/memory/buffer/SizeBasedMessageBufferTest.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,
@@ -16,9 +16,6 @@
  */
 package org.apache.activemq.memory.buffer;
 
-import org.apache.activemq.memory.buffer.MessageBuffer;
-import org.apache.activemq.memory.buffer.SizeBasedMessageBuffer;
-
 /**
  *
  *

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/BrokerNetworkWithStuckMessagesTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/BrokerNetworkWithStuckMessagesTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/BrokerNetworkWithStuckMessagesTest.java
index c483715..ce7c5ea 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/BrokerNetworkWithStuckMessagesTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/BrokerNetworkWithStuckMessagesTest.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,
@@ -16,11 +16,14 @@
  */
 package org.apache.activemq.network;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
+import javax.jms.Connection;
+import javax.jms.DeliveryMode;
+import javax.jms.MessageNotWriteableException;
+import javax.jms.Queue;
+import javax.jms.QueueBrowser;
+import javax.jms.Session;
+import javax.management.ObjectName;
+import javax.management.openmbean.CompositeData;
 import java.io.File;
 import java.io.IOException;
 import java.net.URI;
@@ -33,16 +36,6 @@ import java.util.List;
 import java.util.Map;
 import java.util.concurrent.TimeUnit;
 
-import javax.jms.Connection;
-import javax.jms.DeliveryMode;
-import javax.jms.MessageNotWriteableException;
-import javax.jms.Queue;
-import javax.jms.QueueBrowser;
-import javax.jms.Session;
-import javax.management.ObjectName;
-
-import javax.management.openmbean.CompositeData;
-
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.BrokerTestSupport;
@@ -75,6 +68,11 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
 /**
  * This class duplicates most of the functionality in {@link NetworkTestSupport}
  * and {@link BrokerTestSupport} because more control was needed over how brokers
@@ -496,8 +494,7 @@ public class BrokerNetworkWithStuckMessagesTest {
             list.add(enumn.nextElement());
          }
          messages = list.toArray();
-      }
-      finally {
+      } finally {
          if (session != null) {
             session.close();
          }
@@ -570,8 +567,7 @@ public class BrokerNetworkWithStuckMessagesTest {
          DestinationInfo info = createTempDestinationInfo(connectionInfo1, destinationType);
          connection.send(info);
          return info.getDestination();
-      }
-      else {
+      } else {
          return ActiveMQDestination.createDestination(queueName, destinationType);
       }
    }
@@ -589,8 +585,7 @@ public class BrokerNetworkWithStuckMessagesTest {
       message.setPersistent(false);
       try {
          message.setText("Test Message Payload.");
-      }
-      catch (MessageNotWriteableException e) {
+      } catch (MessageNotWriteableException e) {
       }
       return message;
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/CheckDuplicateMessagesOnDuplexTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/CheckDuplicateMessagesOnDuplexTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/CheckDuplicateMessagesOnDuplexTest.java
index 1912215..7fa257b 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/CheckDuplicateMessagesOnDuplexTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/CheckDuplicateMessagesOnDuplexTest.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,
@@ -16,14 +16,6 @@
  */
 package org.apache.activemq.network;
 
-import java.io.File;
-import java.io.IOException;
-import java.net.Socket;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.ArrayList;
-import java.util.List;
-
 import javax.jms.Connection;
 import javax.jms.JMSException;
 import javax.jms.Message;
@@ -32,6 +24,13 @@ import javax.jms.MessageProducer;
 import javax.jms.Session;
 import javax.jms.TextMessage;
 import javax.net.ServerSocketFactory;
+import java.io.File;
+import java.io.IOException;
+import java.net.Socket;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.List;
 
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.BrokerService;
@@ -57,7 +56,9 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 
 /**
  * @author x22koe
@@ -285,8 +286,7 @@ public class CheckDuplicateMessagesOnDuplexTest {
    private PersistenceAdapter persistenceAdapterFactory(String path) {
       if (useLevelDB) {
          return persistenceAdapterFactory_LevelDB(path);
-      }
-      else {
+      } else {
          return persistenceAdapterFactory_KahaDB(path);
       }
    }
@@ -347,8 +347,7 @@ public class CheckDuplicateMessagesOnDuplexTest {
             log.warn("\n\nclosing connection before response is sent\n\n");
             try {
                ((NIOTransport) next).stop();
-            }
-            catch (Exception ex) {
+            } catch (Exception ex) {
                log.error("couldn't stop niotransport", ex);
             }
             // don't send response

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/CompressionOverNetworkTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/CompressionOverNetworkTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/CompressionOverNetworkTest.java
index 2ae7bc7..19beb7f 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/CompressionOverNetworkTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/CompressionOverNetworkTest.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,
@@ -16,16 +16,6 @@
  */
 package org.apache.activemq.network;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
-import java.net.URI;
-import java.nio.charset.StandardCharsets;
-import java.util.Arrays;
-import java.util.UUID;
-import java.util.concurrent.ConcurrentMap;
-
 import javax.jms.BytesMessage;
 import javax.jms.Connection;
 import javax.jms.DeliveryMode;
@@ -35,6 +25,11 @@ import javax.jms.MessageConsumer;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
 import javax.jms.StreamMessage;
+import java.net.URI;
+import java.nio.charset.StandardCharsets;
+import java.util.Arrays;
+import java.util.UUID;
+import java.util.concurrent.ConcurrentMap;
 
 import org.apache.activemq.ActiveMQConnection;
 import org.apache.activemq.ActiveMQConnectionFactory;
@@ -58,6 +53,10 @@ import org.springframework.context.support.AbstractApplicationContext;
 import org.springframework.core.io.ClassPathResource;
 import org.springframework.core.io.Resource;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
 public class CompressionOverNetworkTest {
 
    protected static final int RECEIVE_TIMEOUT_MILLS = 10000;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DemandForwardingBridgeFilterTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DemandForwardingBridgeFilterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DemandForwardingBridgeFilterTest.java
index dacc9f0..164e01a 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DemandForwardingBridgeFilterTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DemandForwardingBridgeFilterTest.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,
@@ -16,6 +16,8 @@
  */
 package org.apache.activemq.network;
 
+import java.util.Arrays;
+
 import junit.framework.Test;
 
 import org.apache.activemq.broker.StubConnection;
@@ -26,8 +28,6 @@ import org.apache.activemq.command.Message;
 import org.apache.activemq.command.ProducerInfo;
 import org.apache.activemq.command.SessionInfo;
 
-import java.util.Arrays;
-
 public class DemandForwardingBridgeFilterTest extends NetworkTestSupport {
 
    private DemandForwardingBridge bridge;
@@ -191,4 +191,4 @@ public class DemandForwardingBridgeFilterTest extends NetworkTestSupport {
       bridge.start();
    }
 
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DemandForwardingBridgeTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DemandForwardingBridgeTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DemandForwardingBridgeTest.java
index aac61ff..4879428 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DemandForwardingBridgeTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DemandForwardingBridgeTest.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,
@@ -139,8 +139,7 @@ public class DemandForwardingBridgeTest extends NetworkTestSupport {
       // subscriptions.
       try {
          Thread.sleep(1000);
-      }
-      catch (InterruptedException ie) {
+      } catch (InterruptedException ie) {
          ie.printStackTrace();
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DuplexNetworkMBeanTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DuplexNetworkMBeanTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DuplexNetworkMBeanTest.java
index 526f0e5..eb0773f 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DuplexNetworkMBeanTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DuplexNetworkMBeanTest.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,
@@ -16,19 +16,18 @@
  */
 package org.apache.activemq.network;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assume.assumeNotNull;
-
+import javax.management.ObjectName;
 import java.net.MalformedURLException;
 import java.util.Set;
 
-import javax.management.ObjectName;
-
 import org.apache.activemq.broker.BrokerService;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assume.assumeNotNull;
+
 public class DuplexNetworkMBeanTest {
 
    protected static final Logger LOG = LoggerFactory.getLogger(DuplexNetworkMBeanTest.class);
@@ -66,8 +65,7 @@ public class DuplexNetworkMBeanTest {
                assertEquals(1, countMbeans(networkedBroker, "networkBridge", 2000));
                assertEquals(1, countMbeans(broker, "networkBridge", 2000));
                assertEquals(2, countMbeans(broker, "connectionName"));
-            }
-            finally {
+            } finally {
                networkedBroker.stop();
                networkedBroker.waitUntilStopped();
             }
@@ -79,8 +77,7 @@ public class DuplexNetworkMBeanTest {
          assertEquals(0, countMbeans(networkedBroker, "connector"));
          assertEquals(0, countMbeans(networkedBroker, "connectionName"));
          assertEquals(1, countMbeans(broker, "connector"));
-      }
-      finally {
+      } finally {
          broker.stop();
          broker.waitUntilStopped();
       }
@@ -102,8 +99,7 @@ public class DuplexNetworkMBeanTest {
                broker.start();
                assertEquals(1, countMbeans(networkedBroker, "networkBridge", 5000));
                assertEquals("restart number: " + i, 2, countMbeans(broker, "connectionName", 10000));
-            }
-            finally {
+            } finally {
                broker.stop();
                broker.waitUntilStopped();
             }
@@ -113,8 +109,7 @@ public class DuplexNetworkMBeanTest {
          assertEquals(1, countMbeans(networkedBroker, "connector=networkConnectors"));
          assertEquals(0, countMbeans(networkedBroker, "connectionName"));
          assertEquals(0, countMbeans(broker, "connectionName"));
-      }
-      finally {
+      } finally {
          networkedBroker.stop();
          networkedBroker.waitUntilStopped();
       }
@@ -143,8 +138,7 @@ public class DuplexNetworkMBeanTest {
          mbeans = broker.getManagementContext().queryNames(beanName, null);
          if (mbeans != null) {
             count = mbeans.size();
-         }
-         else {
+         } else {
             logAllMbeans(broker);
          }
       } while ((mbeans == null || mbeans.isEmpty()) && expiryTime > System.currentTimeMillis());
@@ -166,8 +160,7 @@ public class DuplexNetworkMBeanTest {
          for (ObjectName on : all) {
             LOG.info(on.toString());
          }
-      }
-      catch (Exception ignored) {
+      } catch (Exception ignored) {
          LOG.warn("getMBeanServer ex: " + ignored);
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DuplexNetworkTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DuplexNetworkTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DuplexNetworkTest.java
index ddfba7d..1f89eca 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DuplexNetworkTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DuplexNetworkTest.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,
@@ -16,9 +16,6 @@
  */
 package org.apache.activemq.network;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
 import javax.jms.MessageProducer;
 import javax.jms.TemporaryQueue;
 
@@ -26,6 +23,9 @@ import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.util.Wait;
 import org.junit.Test;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 public class DuplexNetworkTest extends SimpleNetworkTest {
 
    @Override

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DynamicallyIncludedDestinationsDuplexNetworkTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DynamicallyIncludedDestinationsDuplexNetworkTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DynamicallyIncludedDestinationsDuplexNetworkTest.java
index 1f7cbb5..2d65445 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DynamicallyIncludedDestinationsDuplexNetworkTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/DynamicallyIncludedDestinationsDuplexNetworkTest.java
@@ -16,15 +16,10 @@
  */
 package org.apache.activemq.network;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-
-import java.lang.reflect.Field;
-import java.util.concurrent.CopyOnWriteArrayList;
-
 import javax.jms.MessageProducer;
 import javax.jms.TemporaryQueue;
+import java.lang.reflect.Field;
+import java.util.concurrent.CopyOnWriteArrayList;
 
 import org.apache.activemq.advisory.AdvisorySupport;
 import org.apache.activemq.broker.BrokerService;
@@ -32,6 +27,10 @@ import org.apache.activemq.broker.TransportConnection;
 import org.apache.activemq.broker.TransportConnector;
 import org.junit.Test;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+
 /**
  * @author <a href="http://www.christianposta.com/blog">Christian Posta</a>
  */

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/FailoverStaticNetworkTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/FailoverStaticNetworkTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/FailoverStaticNetworkTest.java
index d541a15..49dc7f8 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/FailoverStaticNetworkTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/FailoverStaticNetworkTest.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,
@@ -16,9 +16,15 @@
  */
 package org.apache.activemq.network;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.Session;
+import javax.management.ObjectName;
+import javax.net.ssl.KeyManager;
+import javax.net.ssl.TrustManager;
 import java.net.URI;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -30,16 +36,6 @@ import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.atomic.AtomicBoolean;
 
-import javax.jms.Connection;
-import javax.jms.ConnectionFactory;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-import javax.management.ObjectName;
-import javax.net.ssl.KeyManager;
-import javax.net.ssl.TrustManager;
-
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.SslContext;
@@ -56,6 +52,9 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 public class FailoverStaticNetworkTest {
 
    protected static final Logger LOG = LoggerFactory.getLogger(FailoverStaticNetworkTest.class);
@@ -215,8 +214,7 @@ public class FailoverStaticNetworkTest {
          public void run() {
             try {
                slave.start();
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                e.printStackTrace();
                errors.add(e);
             }
@@ -260,8 +258,7 @@ public class FailoverStaticNetworkTest {
          public void run() {
             try {
                slave.start();
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                e.printStackTrace();
             }
          }
@@ -358,8 +355,7 @@ public class FailoverStaticNetworkTest {
                   // restart after peer taken over
                   brokerA1.waitUntilStarted();
                }
-            }
-            catch (Exception ignored) {
+            } catch (Exception ignored) {
                LOG.info("A create/start, unexpected: " + ignored, ignored);
             }
          }
@@ -389,8 +385,7 @@ public class FailoverStaticNetworkTest {
                   // restart after peer taken over
                   brokerA.waitUntilStarted();
                }
-            }
-            catch (Exception ignored) {
+            } catch (Exception ignored) {
                LOG.info("A1 create/start, unexpected: " + ignored, ignored);
             }
          }
@@ -445,8 +440,7 @@ public class FailoverStaticNetworkTest {
       });
       try {
          consConn.close();
-      }
-      catch (JMSException ignored) {
+      } catch (JMSException ignored) {
       }
       assertTrue("consumer on A got message", gotMessage);
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/ForwardingBridgeTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/ForwardingBridgeTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/ForwardingBridgeTest.java
index 30df2b4..441fc4d 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/ForwardingBridgeTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/ForwardingBridgeTest.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,
@@ -68,8 +68,7 @@ public class ForwardingBridgeTest extends NetworkTestSupport {
       // Give forwarding bridge a chance to finish setting up
       try {
          Thread.sleep(1000);
-      }
-      catch (InterruptedException ie) {
+      } catch (InterruptedException ie) {
          ie.printStackTrace();
       }
 
@@ -114,8 +113,7 @@ public class ForwardingBridgeTest extends NetworkTestSupport {
       // Give forwarding bridge a chance to finish setting up
       try {
          Thread.sleep(1000);
-      }
-      catch (InterruptedException ie) {
+      } catch (InterruptedException ie) {
          ie.printStackTrace();
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/MQTTNetworkOfBrokersFailoverTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/MQTTNetworkOfBrokersFailoverTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/MQTTNetworkOfBrokersFailoverTest.java
index 4ee1adb..744dd38 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/MQTTNetworkOfBrokersFailoverTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/MQTTNetworkOfBrokersFailoverTest.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,
@@ -16,10 +16,6 @@
  */
 package org.apache.activemq.network;
 
-import java.net.URI;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-
 import javax.jms.Connection;
 import javax.jms.Destination;
 import javax.jms.JMSException;
@@ -28,6 +24,9 @@ import javax.jms.MessageConsumer;
 import javax.jms.MessageListener;
 import javax.jms.Session;
 import javax.management.ObjectName;
+import java.net.URI;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.BrokerService;
@@ -155,8 +154,7 @@ public class MQTTNetworkOfBrokersFailoverTest extends NetworkTestSupport {
                   try {
                      session.close();
                      connection.close();
-                  }
-                  catch (JMSException e) {
+                  } catch (JMSException e) {
                      e.printStackTrace();
                   }
                }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/MulticastNetworkTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/MulticastNetworkTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/MulticastNetworkTest.java
index 0bf10d4..c2b9cd9 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/MulticastNetworkTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/MulticastNetworkTest.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/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkBrokerDetachTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkBrokerDetachTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkBrokerDetachTest.java
index 1c89002..dfe1657 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkBrokerDetachTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkBrokerDetachTest.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,
@@ -16,13 +16,6 @@
  */
 package org.apache.activemq.network;
 
-import static org.junit.Assert.assertTrue;
-
-import java.io.File;
-import java.util.Arrays;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
 import javax.jms.Message;
@@ -30,6 +23,10 @@ import javax.jms.MessageListener;
 import javax.jms.Session;
 import javax.jms.TopicSubscriber;
 import javax.management.ObjectName;
+import java.io.File;
+import java.util.Arrays;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.ActiveMQPrefetchPolicy;
@@ -46,6 +43,8 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.junit.Assert.assertTrue;
+
 public class NetworkBrokerDetachTest {
 
    private final static String BROKER_NAME = "broker";
@@ -254,8 +253,7 @@ public class NetworkBrokerDetachTest {
 
                if (destination.isQueue()) {
                   destinations = broker.getAdminView().getQueues();
-               }
-               else {
+               } else {
                   destinations = broker.getAdminView().getTopics();
                }
 
@@ -272,8 +270,7 @@ public class NetworkBrokerDetachTest {
                   }
                }
 
-            }
-            catch (Exception ignoreAndRetry) {
+            } catch (Exception ignoreAndRetry) {
             }
             return result;
          }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkConnectionsTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkConnectionsTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkConnectionsTest.java
index 0d5639c..bc9422b 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkConnectionsTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkConnectionsTest.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,
@@ -16,6 +16,12 @@
  */
 package org.apache.activemq.network;
 
+import javax.jms.Connection;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+
 import junit.framework.TestCase;
 
 import org.apache.activemq.ActiveMQConnectionFactory;
@@ -25,8 +31,6 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.jms.*;
-
 public class NetworkConnectionsTest extends TestCase {
 
    private static final Logger LOG = LoggerFactory.getLogger(NetworkConnectionsTest.class);
@@ -244,4 +248,4 @@ public class NetworkConnectionsTest extends TestCase {
          remoteBroker = null;
       }
    }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkDestinationFilterTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkDestinationFilterTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkDestinationFilterTest.java
index b1db5af..a16f9b0 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkDestinationFilterTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkDestinationFilterTest.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,
@@ -16,6 +16,9 @@
  */
 package org.apache.activemq.network;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import junit.framework.TestCase;
 
 import org.apache.activemq.advisory.AdvisorySupport;
@@ -24,9 +27,6 @@ import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.command.ActiveMQTempQueue;
 import org.apache.activemq.command.ActiveMQTopic;
 
-import java.util.ArrayList;
-import java.util.List;
-
 public class NetworkDestinationFilterTest extends TestCase {
 
    public void testFilter() throws Exception {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkFailoverTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkFailoverTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkFailoverTest.java
index 5e24b5e..1475254 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkFailoverTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkFailoverTest.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,
@@ -16,9 +16,6 @@
  */
 package org.apache.activemq.network;
 
-import java.io.IOException;
-import java.util.concurrent.atomic.AtomicInteger;
-
 import javax.jms.Connection;
 import javax.jms.DeliveryMode;
 import javax.jms.Destination;
@@ -30,6 +27,8 @@ import javax.jms.MessageProducer;
 import javax.jms.Queue;
 import javax.jms.Session;
 import javax.jms.TextMessage;
+import java.io.IOException;
+import java.util.concurrent.atomic.AtomicInteger;
 
 import junit.framework.TestCase;
 
@@ -82,18 +81,15 @@ public class NetworkFailoverTest extends TestCase {
                remoteProducer.send(replyTo, textMsg);
                LOG.info("replied with: " + textMsg.getJMSMessageID());
 
-            }
-            catch (DestinationDoesNotExistException expected) {
+            } catch (DestinationDoesNotExistException expected) {
                // been removed but not yet recreated
                replyToNonExistDest.incrementAndGet();
                try {
                   LOG.info("NED: " + textMsg.getJMSMessageID());
-               }
-               catch (JMSException e) {
+               } catch (JMSException e) {
                   e.printStackTrace();
                }
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                LOG.warn("*** Responder listener caught exception: ", e);
                e.printStackTrace();
             }
@@ -112,8 +108,7 @@ public class NetworkFailoverTest extends TestCase {
          public void onMessage(Message message) {
             try {
                LOG.info("dlq " + message.getJMSMessageID());
-            }
-            catch (JMSException e) {
+            } catch (JMSException e) {
                e.printStackTrace();
             }
             remoteDLQCount.incrementAndGet();
@@ -161,19 +156,16 @@ public class NetworkFailoverTest extends TestCase {
       try {
          localConnection.close();
          remoteConnection.close();
-      }
-      catch (Exception ex) {
+      } catch (Exception ex) {
       }
 
       try {
          localBroker.stop();
-      }
-      catch (Exception ex) {
+      } catch (Exception ex) {
       }
       try {
          remoteBroker.stop();
-      }
-      catch (Exception ex) {
+      } catch (Exception ex) {
       }
    }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkLoadTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkLoadTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkLoadTest.java
index 5471218..fbf261c 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkLoadTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkLoadTest.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,
@@ -16,14 +16,6 @@
  */
 package org.apache.activemq.network;
 
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
-import java.util.concurrent.atomic.AtomicReference;
-
 import javax.jms.Connection;
 import javax.jms.DeliveryMode;
 import javax.jms.JMSException;
@@ -33,6 +25,13 @@ import javax.jms.MessageListener;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
 import javax.jms.TextMessage;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicLong;
+import java.util.concurrent.atomic.AtomicReference;
 
 import junit.framework.TestCase;
 
@@ -96,8 +95,7 @@ public class NetworkLoadTest extends TestCase {
                try {
                   producer.send(msg);
                   forwardCounter.incrementAndGet();
-               }
-               catch (JMSException e) {
+               } catch (JMSException e) {
                   // this is caused by the connection getting closed.
                }
             }
@@ -269,8 +267,7 @@ public class NetworkLoadTest extends TestCase {
                   producer.send(msg);
                   producedMessages.incrementAndGet();
                }
-            }
-            catch (JMSException e) {
+            } catch (JMSException e) {
                e.printStackTrace();
             }
          }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkLoopBackTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkLoopBackTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkLoopBackTest.java
index 34c9a1b..a9ffcee 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkLoopBackTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkLoopBackTest.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,
@@ -16,14 +16,14 @@
  */
 package org.apache.activemq.network;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertTrue;
-
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.TransportConnector;
 import org.apache.activemq.util.Wait;
 import org.junit.Test;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 public class NetworkLoopBackTest {
 
    @Test
@@ -33,8 +33,7 @@ public class NetworkLoopBackTest {
 
       TransportConnector transportConnector = brokerServce.addConnector("nio://0.0.0.0:0");
       // connection filter is bypassed when scheme is different
-      final NetworkConnector networkConnector = brokerServce.addNetworkConnector("static:(tcp://"
-              + transportConnector.getConnectUri().getHost() + ":" +  transportConnector.getConnectUri().getPort() + ")");
+      final NetworkConnector networkConnector = brokerServce.addNetworkConnector("static:(tcp://" + transportConnector.getConnectUri().getHost() + ":" + transportConnector.getConnectUri().getPort() + ")");
 
       brokerServce.start();
       brokerServce.waitUntilStarted();
@@ -59,9 +58,8 @@ public class NetworkLoopBackTest {
 
          assertEquals("No peer brokers", 0, brokerServce.getBroker().getPeerBrokerInfos().length);
 
-      }
-      finally {
+      } finally {
          brokerServce.stop();
       }
    }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java
index 8e345f4..0639fb1 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkReconnectTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkReconnectTest.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,
@@ -16,11 +16,6 @@
  */
 package org.apache.activemq.network;
 
-import java.net.URI;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.concurrent.atomic.AtomicInteger;
-
 import javax.jms.Connection;
 import javax.jms.Destination;
 import javax.jms.JMSException;
@@ -28,6 +23,10 @@ import javax.jms.Message;
 import javax.jms.MessageConsumer;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
+import java.net.URI;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.concurrent.atomic.AtomicInteger;
 
 import junit.framework.TestCase;
 
@@ -201,13 +200,11 @@ public class NetworkReconnectTest extends TestCase {
       disposeConsumerConnections();
       try {
          stopProducerBroker();
-      }
-      catch (Throwable e) {
+      } catch (Throwable e) {
       }
       try {
          stopConsumerBroker();
-      }
-      catch (Throwable e) {
+      } catch (Throwable e) {
       }
    }
 
@@ -216,8 +213,7 @@ public class NetworkReconnectTest extends TestCase {
          Connection connection = iter.next();
          try {
             connection.close();
-         }
-         catch (Throwable ignore) {
+         } catch (Throwable ignore) {
          }
       }
    }
@@ -275,12 +271,10 @@ public class NetworkReconnectTest extends TestCase {
          Message message = session.createMessage();
          producer.send(message);
          return message.getJMSMessageID();
-      }
-      finally {
+      } finally {
          try {
             connection.close();
-         }
-         catch (Throwable ignore) {
+         } catch (Throwable ignore) {
          }
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRemovesSubscriptionsTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRemovesSubscriptionsTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRemovesSubscriptionsTest.java
index 7c2a61d..f95db96 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRemovesSubscriptionsTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRemovesSubscriptionsTest.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/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRestartPlainTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRestartPlainTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRestartPlainTest.java
index 02cbbcd..30eda2d 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRestartPlainTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRestartPlainTest.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/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRestartTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRestartTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRestartTest.java
index d100c54..eb09903 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRestartTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRestartTest.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,
@@ -16,6 +16,13 @@
  */
 package org.apache.activemq.network;
 
+import javax.jms.Connection;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.TestSupport;
 import org.apache.activemq.broker.BrokerService;
@@ -26,8 +33,6 @@ import org.slf4j.LoggerFactory;
 import org.springframework.core.io.ClassPathResource;
 import org.springframework.core.io.Resource;
 
-import javax.jms.*;
-
 public class NetworkRestartTest extends TestSupport {
 
    private static final Logger LOG = LoggerFactory.getLogger(NetworkRestartTest.class);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRouteTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRouteTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRouteTest.java
index 1b0390b..f712349 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRouteTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkRouteTest.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,
@@ -339,4 +339,4 @@ public class NetworkRouteTest {
          Assert.assertTrue(latch.await(timeout, unit));
       }
    }
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkTestSupport.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkTestSupport.java
index 722459c..f5ceabd 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkTestSupport.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/network/NetworkTestSupport.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,


Mime
View raw message