You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ma...@apache.org on 2016/09/30 15:26:12 UTC

[12/52] [partial] activemq-artemis git commit: ARTEMIS-765 Improve Checkstyle

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageEvictionTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageEvictionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageEvictionTest.java
index d95350e..e50c588 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageEvictionTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageEvictionTest.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,6 @@
  */
 package org.apache.activemq;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.util.ArrayList;
-import java.util.List;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.ExecutorService;
-import java.util.concurrent.Executors;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
 import javax.jms.JMSException;
@@ -38,6 +25,13 @@ import javax.jms.MessageListener;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
 import javax.jms.Topic;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.activemq.advisory.AdvisorySupport;
 import org.apache.activemq.broker.BrokerService;
@@ -57,6 +51,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.assertTrue;
+import static org.junit.Assert.fail;
+
 public class MessageEvictionTest {
 
    static final Logger LOG = LoggerFactory.getLogger(MessageEvictionTest.class);
@@ -131,12 +130,10 @@ public class MessageEvictionTest {
                         assertEquals(++advisoriesReceived, activeMQMessage.getIntProperty(AdvisorySupport.MSG_PROPERTY_DISCARDED_COUNT));
                         message.acknowledge();
                         advisoryIsGood.countDown();
-                     }
-                     catch (JMSException e) {
+                     } catch (JMSException e) {
                         e.printStackTrace();
                         fail(e.toString());
-                     }
-                     finally {
+                     } finally {
                         gotAdvisory.countDown();
                      }
                   }
@@ -145,8 +142,7 @@ public class MessageEvictionTest {
                gotAdvisory.await(120, TimeUnit.SECONDS);
                consumer.close();
                advisorySession.close();
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                e.printStackTrace();
                fail(e.toString());
             }
@@ -178,12 +174,10 @@ public class MessageEvictionTest {
                         LOG.info("acking: " + message.getJMSMessageID());
                         message.acknowledge();
                         ackDone.countDown();
-                     }
-                     catch (Exception e) {
+                     } catch (Exception e) {
                         e.printStackTrace();
                         fail(e.toString());
-                     }
-                     finally {
+                     } finally {
                         consumerRegistered.countDown();
                         ackDone.countDown();
                      }
@@ -192,8 +186,7 @@ public class MessageEvictionTest {
                consumerRegistered.countDown();
                ackDone.await(60, TimeUnit.SECONDS);
                consumer.close();
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                e.printStackTrace();
                fail(e.toString());
             }
@@ -217,8 +210,7 @@ public class MessageEvictionTest {
                }
                producer.close();
                sendDone.countDown();
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                sendDone.countDown();
                e.printStackTrace();
                fail(e.toString());

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageListenerRedeliveryTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageListenerRedeliveryTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageListenerRedeliveryTest.java
index 80744bd..363c8e0 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageListenerRedeliveryTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageListenerRedeliveryTest.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;
 
-import java.util.ArrayList;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
 import javax.jms.Connection;
 import javax.jms.DeliveryMode;
 import javax.jms.Destination;
@@ -32,6 +27,10 @@ import javax.jms.MessageProducer;
 import javax.jms.Queue;
 import javax.jms.Session;
 import javax.jms.TextMessage;
+import java.util.ArrayList;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
 
 import junit.framework.TestCase;
 
@@ -96,14 +95,12 @@ public class MessageListenerRedeliveryTest extends TestCase {
             if (counter <= 4) {
                LOG.info("Message Rollback.");
                session.rollback();
-            }
-            else {
+            } else {
                LOG.info("Message Commit.");
                message.acknowledge();
                session.commit();
             }
-         }
-         catch (JMSException e) {
+         } catch (JMSException e) {
             LOG.error("Error when rolling back transaction");
          }
       }
@@ -129,8 +126,7 @@ public class MessageListenerRedeliveryTest extends TestCase {
 
       try {
          Thread.sleep(500);
-      }
-      catch (InterruptedException e) {
+      } catch (InterruptedException e) {
       }
 
       // first try.. should get 2 since there is no delay on the
@@ -139,16 +135,14 @@ public class MessageListenerRedeliveryTest extends TestCase {
 
       try {
          Thread.sleep(1000);
-      }
-      catch (InterruptedException e) {
+      } catch (InterruptedException e) {
       }
       // 2nd redeliver (redelivery after 1 sec)
       assertEquals(3, listener.counter);
 
       try {
          Thread.sleep(2000);
-      }
-      catch (InterruptedException e) {
+      } catch (InterruptedException e) {
       }
       // 3rd redeliver (redelivery after 2 seconds) - it should give up after
       // that
@@ -160,16 +154,14 @@ public class MessageListenerRedeliveryTest extends TestCase {
 
       try {
          Thread.sleep(500);
-      }
-      catch (InterruptedException e) {
+      } catch (InterruptedException e) {
       }
       // it should be committed, so no redelivery
       assertEquals(5, listener.counter);
 
       try {
          Thread.sleep(1500);
-      }
-      catch (InterruptedException e) {
+      } catch (InterruptedException e) {
       }
       // no redelivery, counter should still be 4
       assertEquals(5, listener.counter);
@@ -197,8 +189,7 @@ public class MessageListenerRedeliveryTest extends TestCase {
 
       try {
          Thread.sleep(500);
-      }
-      catch (InterruptedException e) {
+      } catch (InterruptedException e) {
 
       }
       // first try
@@ -206,8 +197,7 @@ public class MessageListenerRedeliveryTest extends TestCase {
 
       try {
          Thread.sleep(1000);
-      }
-      catch (InterruptedException e) {
+      } catch (InterruptedException e) {
 
       }
       // second try (redelivery after 1 sec)
@@ -215,8 +205,7 @@ public class MessageListenerRedeliveryTest extends TestCase {
 
       try {
          Thread.sleep(2000);
-      }
-      catch (InterruptedException e) {
+      } catch (InterruptedException e) {
 
       }
       // third try (redelivery after 2 seconds) - it should give up after that
@@ -228,8 +217,7 @@ public class MessageListenerRedeliveryTest extends TestCase {
 
       try {
          Thread.sleep(500);
-      }
-      catch (InterruptedException e) {
+      } catch (InterruptedException e) {
          // ignore
       }
       // it should be committed, so no redelivery
@@ -237,8 +225,7 @@ public class MessageListenerRedeliveryTest extends TestCase {
 
       try {
          Thread.sleep(1500);
-      }
-      catch (InterruptedException e) {
+      } catch (InterruptedException e) {
          // ignore
       }
       // no redelivery, counter should still be 4
@@ -270,8 +257,7 @@ public class MessageListenerRedeliveryTest extends TestCase {
             LOG.info("Message Received: " + message);
             try {
                received.add(((TextMessage) message).getText());
-            }
-            catch (JMSException e) {
+            } catch (JMSException e) {
                e.printStackTrace();
                fail(e.toString());
             }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageTransformationTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageTransformationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageTransformationTest.java
index 683e314..22b310c 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageTransformationTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/MessageTransformationTest.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/OnePrefetchAsyncConsumerTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java
index 0246253..5b2f7a3 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/OnePrefetchAsyncConsumerTest.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;
 
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
 import javax.jms.Connection;
 import javax.jms.ConnectionConsumer;
 import javax.jms.ConnectionFactory;
@@ -31,6 +28,8 @@ import javax.jms.ServerSession;
 import javax.jms.ServerSessionPool;
 import javax.jms.Session;
 import javax.jms.TextMessage;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.region.policy.PolicyEntry;
@@ -189,8 +188,7 @@ public class OnePrefetchAsyncConsumerTest extends EmbeddedBrokerTestSupport {
                      LOG.debug("About to call session.commit");
                      session.commit();
                      LOG.debug("Commit completed");
-                  }
-                  catch (JMSException e) {
+                  } catch (JMSException e) {
                      LOG.error("In start", e);
                   }
                   pool.serverSessionInUse = false;
@@ -213,17 +211,14 @@ public class OnePrefetchAsyncConsumerTest extends EmbeddedBrokerTestSupport {
                // computation logic in PrefetchSubscription to get here
                success.set(true);
                completed.set(true);
-            }
-            else if (text.equals("Msg2")) {
+            } else if (text.equals("Msg2")) {
                // simulate long message processing so that Msg3 comes when Msg2 is still being
                // processed and thus the single ServerSession is in use
                TimeUnit.SECONDS.sleep(4);
             }
-         }
-         catch (JMSException e) {
+         } catch (JMSException e) {
             LOG.error("in onMessage", e);
-         }
-         catch (InterruptedException e) {
+         } catch (InterruptedException e) {
             LOG.error("in onMessage", e);
          }
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/OptimizedAckTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/OptimizedAckTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/OptimizedAckTest.java
index fb44c71..0697e12 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/OptimizedAckTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/OptimizedAckTest.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;
 
-import java.util.concurrent.TimeUnit;
-
 import javax.jms.MessageConsumer;
 import javax.jms.MessageProducer;
 import javax.jms.Queue;
 import javax.jms.Session;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.core.postoffice.Binding;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/PerDestinationStoreLimitTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/PerDestinationStoreLimitTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/PerDestinationStoreLimitTest.java
index 0f70d8f..02c6241 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/PerDestinationStoreLimitTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/PerDestinationStoreLimitTest.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,6 @@
  */
 package org.apache.activemq;
 
-import java.io.IOException;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicLong;
-
 import javax.jms.ConnectionFactory;
 import javax.jms.JMSException;
 import javax.jms.MessageConsumer;
@@ -29,6 +23,11 @@ import javax.jms.MessageProducer;
 import javax.jms.Session;
 import javax.jms.TextMessage;
 import javax.jms.Topic;
+import java.io.IOException;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicLong;
 
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.TransportConnector;
@@ -106,8 +105,7 @@ public class PerDestinationStoreLimitTest extends JmsTestSupport {
                      LOG.info("committed/sent: " + sent.get());
                   }
                   LOG.info("sent: " + i);
-               }
-               catch (JMSException e) {
+               } catch (JMSException e) {
                }
             }
          }
@@ -135,8 +133,7 @@ public class PerDestinationStoreLimitTest extends JmsTestSupport {
                // force the use of the DLQ which will use some more store
                LOG.info("rollback on : " + received);
                consumerSession.rollback();
-            }
-            else {
+            } else {
                LOG.info("commit on : " + received);
                consumerSession.commit();
             }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java
index 4a4a07c..06aeeee 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlSendFailTest.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;
 
-import java.util.concurrent.atomic.AtomicBoolean;
-import java.util.concurrent.atomic.AtomicInteger;
-
 import javax.jms.ConnectionFactory;
 import javax.jms.ExceptionListener;
 import javax.jms.JMSException;
@@ -27,6 +24,8 @@ import javax.jms.MessageProducer;
 import javax.jms.ResourceAllocationException;
 import javax.jms.Session;
 import javax.jms.TextMessage;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.region.policy.PolicyEntry;
@@ -94,8 +93,7 @@ public class ProducerFlowControlSendFailTest extends ProducerFlowControlTest {
                      // will be limited by the network buffers
                      Thread.sleep(200);
                   }
-               }
-               catch (Exception e) {
+               } catch (Exception e) {
                   // with async send, there will be no exceptions
                   e.printStackTrace();
                }
@@ -137,8 +135,7 @@ public class ProducerFlowControlSendFailTest extends ProducerFlowControlTest {
             while (keepGoing.get()) {
                try {
                   producer.send(session.createTextMessage("Test message"));
-               }
-               catch (JMSException arg0) {
+               } catch (JMSException arg0) {
                   if (arg0 instanceof ResourceAllocationException) {
                      gotResourceException.set(true);
                      exceptionCount.incrementAndGet();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlTest.java
index 0c6433e..721da2c 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ProducerFlowControlTest.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;
 
-import java.io.IOException;
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicBoolean;
-
 import javax.jms.ConnectionFactory;
 import javax.jms.DeliveryMode;
 import javax.jms.JMSException;
@@ -28,6 +23,10 @@ import javax.jms.MessageConsumer;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
 import javax.jms.TextMessage;
+import java.io.IOException;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.TransportConnector;
@@ -103,8 +102,7 @@ public class ProducerFlowControlTest extends JmsTestSupport {
                try {
                   producer.send(session.createTextMessage("Test message " + ++i));
                   LOG.info("sent: " + i);
-               }
-               catch (JMSException e) {
+               } catch (JMSException e) {
                }
             }
          }
@@ -151,8 +149,7 @@ public class ProducerFlowControlTest extends JmsTestSupport {
                try {
                   producer.send(session.createTextMessage("Test message " + ++i));
                   LOG.info("sent: " + i);
-               }
-               catch (JMSException e) {
+               } catch (JMSException e) {
                }
             }
          }
@@ -270,10 +267,8 @@ public class ProducerFlowControlTest extends JmsTestSupport {
                   done.set(false);
                   producer.send(session.createTextMessage("Hello World"));
                }
-            }
-            catch (JMSException e) {
-            }
-            finally {
+            } catch (JMSException e) {
+            } finally {
                safeClose(session);
             }
          }
@@ -306,10 +301,8 @@ public class ProducerFlowControlTest extends JmsTestSupport {
                producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
                producer.send(session.createTextMessage(message));
                done.countDown();
-            }
-            catch (JMSException e) {
-            }
-            finally {
+            } catch (JMSException e) {
+            } finally {
                safeClose(session);
             }
          }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/QueueConsumerPriorityTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/QueueConsumerPriorityTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/QueueConsumerPriorityTest.java
index 8d7da36..75fa6ca 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/QueueConsumerPriorityTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/QueueConsumerPriorityTest.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,
@@ -89,8 +89,7 @@ public class QueueConsumerPriorityTest extends TestCase {
          }
          assertNull(lowConsumer.receive(2000));
 
-      }
-      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/ReconnectWithSameClientIDTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java
index d737f2c..0a2d52b 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ReconnectWithSameClientIDTest.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,12 @@
  */
 package org.apache.activemq;
 
-import java.util.concurrent.atomic.AtomicBoolean;
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
 import javax.jms.InvalidClientIDException;
 import javax.jms.JMSException;
 import javax.jms.Session;
+import java.util.concurrent.atomic.AtomicBoolean;
 
 import junit.framework.Test;
 
@@ -73,11 +73,9 @@ public class ReconnectWithSameClientIDTest extends EmbeddedBrokerTestSupport {
             try {
                useConnection(connection2);
                fail("Should have thrown InvalidClientIDException on attempt" + i);
-            }
-            catch (InvalidClientIDException e) {
+            } catch (InvalidClientIDException e) {
                LOG.info("Caught expected: " + e);
-            }
-            finally {
+            } finally {
                connection2.close();
             }
          }
@@ -87,8 +85,7 @@ public class ReconnectWithSameClientIDTest extends EmbeddedBrokerTestSupport {
          connection.close();
          connection = connectionFactory.createConnection();
          useConnection(connection);
-      }
-      finally {
+      } finally {
          log4jLogger.removeAppender(appender);
       }
       assertFalse("failed on unexpected log event", failed.get());

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java
index ea042bf..4c9e0ac 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/RedeliveryPolicyTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/RedeliveryPolicyTest.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;
 
-import java.util.concurrent.CountDownLatch;
-import java.util.concurrent.TimeUnit;
-import java.util.concurrent.atomic.AtomicInteger;
-
 import javax.jms.JMSException;
 import javax.jms.Message;
 import javax.jms.MessageConsumer;
@@ -29,6 +25,9 @@ import javax.jms.ServerSession;
 import javax.jms.ServerSessionPool;
 import javax.jms.Session;
 import javax.jms.TextMessage;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicInteger;
 
 import junit.framework.Test;
 
@@ -415,8 +414,7 @@ public class RedeliveryPolicyTest extends JmsTestSupport {
          if (i <= maxRedeliveries) {
             assertEquals("1st", m.getText());
             assertEquals(i, m.getRedeliveryCounter());
-         }
-         else {
+         } else {
             assertNull("null on exceeding redelivery count", m);
          }
          connection.close();
@@ -473,8 +471,7 @@ public class RedeliveryPolicyTest extends JmsTestSupport {
                   assertEquals(receivedCount.get(), m.getRedeliveryCounter());
                   receivedCount.incrementAndGet();
                   done.countDown();
-               }
-               catch (Exception ignored) {
+               } catch (Exception ignored) {
                   ignored.printStackTrace();
                }
             }
@@ -482,8 +479,7 @@ public class RedeliveryPolicyTest extends JmsTestSupport {
 
          if (i <= maxRedeliveries) {
             assertTrue("listener done", done.await(5, TimeUnit.SECONDS));
-         }
-         else {
+         } else {
             // final redlivery gets poisoned before dispatch
             assertFalse("listener done", done.await(1, TimeUnit.SECONDS));
          }
@@ -540,28 +536,27 @@ public class RedeliveryPolicyTest extends JmsTestSupport {
                   assertEquals(receivedCount.get(), m.getRedeliveryCounter());
                   receivedCount.incrementAndGet();
                   done.countDown();
-               }
-               catch (Exception ignored) {
+               } catch (Exception ignored) {
                   ignored.printStackTrace();
                }
             }
          });
 
          connection.createConnectionConsumer(destination, null, new ServerSessionPool() {
-                                                @Override
-                                                public ServerSession getServerSession() throws JMSException {
-                                                   return new ServerSession() {
-                                                      @Override
-                                                      public Session getSession() throws JMSException {
-                                                         return session;
-                                                      }
-
-                                                      @Override
-                                                      public void start() throws JMSException {
-                                                      }
-                                                   };
-                                                }
-                                             }, 100, false);
+            @Override
+            public ServerSession getServerSession() throws JMSException {
+               return new ServerSession() {
+                  @Override
+                  public Session getSession() throws JMSException {
+                     return session;
+                  }
+
+                  @Override
+                  public void start() throws JMSException {
+                  }
+               };
+            }
+         }, 100, false);
 
          Wait.waitFor(new Wait.Condition() {
             @Override
@@ -573,8 +568,7 @@ public class RedeliveryPolicyTest extends JmsTestSupport {
 
          if (i <= maxRedeliveries) {
             assertTrue("listener done @" + i, done.await(5, TimeUnit.SECONDS));
-         }
-         else {
+         } else {
             // final redlivery gets poisoned before dispatch
             assertFalse("listener not done @" + i, done.await(1, TimeUnit.SECONDS));
          }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/RemoveDestinationTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/RemoveDestinationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/RemoveDestinationTest.java
index ff1c6c6..9b120db 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/RemoveDestinationTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/RemoveDestinationTest.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,6 @@
  */
 package org.apache.activemq;
 
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.fail;
-
-import java.net.URI;
-import java.util.Iterator;
-import java.util.Set;
-
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
 import javax.jms.JMSException;
@@ -33,6 +24,9 @@ import javax.jms.MessageProducer;
 import javax.jms.Session;
 import javax.jms.TextMessage;
 import javax.jms.Topic;
+import java.net.URI;
+import java.util.Iterator;
+import java.util.Set;
 
 import org.apache.activemq.advisory.DestinationSource;
 import org.apache.activemq.artemis.api.core.SimpleString;
@@ -46,6 +40,11 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 public class RemoveDestinationTest {
 
    private static final String TCP_BROKER_URL = "tcp://localhost:61616?create=false";
@@ -130,8 +129,7 @@ public class RemoveDestinationTest {
       try {
          amqConnection.destroyDestination((ActiveMQDestination) topic);
          fail("expect exception on destroy if comsumer present");
-      }
-      catch (JMSException expected) {
+      } catch (JMSException expected) {
          assertTrue(expected.getMessage().indexOf(amqTopic.getTopicName()) != -1);
       }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/SpringTestSupport.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/SpringTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/SpringTestSupport.java
index bea4d4e..67ec96c 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/SpringTestSupport.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/SpringTestSupport.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/TestSupport.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/TestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/TestSupport.java
index 9ab35dc..2c55c8f 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/TestSupport.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/TestSupport.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,14 @@
  */
 package org.apache.activemq;
 
-import java.io.File;
-import java.io.IOException;
-import java.util.Map;
-
 import javax.jms.Connection;
 import javax.jms.Destination;
 import javax.jms.JMSException;
 import javax.jms.Message;
 import javax.jms.TextMessage;
+import java.io.File;
+import java.io.IOException;
+import java.util.Map;
 
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.region.DestinationStatistics;
@@ -55,8 +54,7 @@ public abstract class TestSupport extends CombinationTestSupport {
    protected Destination createDestination(String subject) {
       if (topic) {
          return new ActiveMQTopic(subject);
-      }
-      else {
+      } else {
          return new ActiveMQQueue(subject);
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/TimeStampTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/TimeStampTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/TimeStampTest.java
index d423442..67267ac 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/TimeStampTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/TimeStampTest.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,
@@ -39,6 +39,7 @@ public class TimeStampTest extends TestCase {
    public void setUp() throws Exception {
       BrokerService.disableWrapper = true;
    }
+
    @Override
    public void tearDown() {
       ArtemisBrokerHelper.stopArtemisBroker();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/TransactionContextTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/TransactionContextTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/TransactionContextTest.java
index a0bcced..9b1e09d 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/TransactionContextTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/TransactionContextTest.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,8 @@
  */
 package org.apache.activemq;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
-import java.util.concurrent.atomic.AtomicInteger;
-
 import javax.jms.TransactionRolledBackException;
+import java.util.concurrent.atomic.AtomicInteger;
 
 import org.apache.activemq.transaction.Synchronization;
 import org.apache.activemq.transport.tcp.TcpTransportFactory;
@@ -29,6 +25,9 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
 public class TransactionContextTest {
 
    TransactionContext underTest;
@@ -40,8 +39,7 @@ public class TransactionContextTest {
       try {
          connection = factory.createActiveMQConnection();
          underTest = new TransactionContext(connection);
-      }
-      catch (Exception e) {
+      } catch (Exception e) {
          e.printStackTrace();
          throw e;
       }
@@ -102,8 +100,7 @@ public class TransactionContextTest {
       try {
          underTest.commit();
          fail("exepcted rollback exception");
-      }
-      catch (TransactionRolledBackException expected) {
+      } catch (TransactionRolledBackException expected) {
       }
 
       assertEquals("beforeEnd A called once", 1, beforeEndCountA.get());

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ZeroPrefetchConsumerTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ZeroPrefetchConsumerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ZeroPrefetchConsumerTest.java
index c171e4b..6c82916 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ZeroPrefetchConsumerTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/ZeroPrefetchConsumerTest.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,
@@ -58,8 +58,7 @@ public class ZeroPrefetchConsumerTest extends EmbeddedBrokerTestSupport {
       try {
          consumer.setMessageListener(listener);
          fail("Should have thrown JMSException as we cannot use MessageListener with zero prefetch");
-      }
-      catch (JMSException e) {
+      } catch (JMSException e) {
          LOG.info("Received expected exception : " + e);
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/AdvisoryTempDestinationTests.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/AdvisoryTempDestinationTests.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/AdvisoryTempDestinationTests.java
index 5889689..4f6c066 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/AdvisoryTempDestinationTests.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/AdvisoryTempDestinationTests.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.advisory;
 
-import java.util.ArrayList;
-import java.util.List;
-
 import javax.jms.BytesMessage;
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
@@ -30,6 +27,8 @@ import javax.jms.Queue;
 import javax.jms.Session;
 import javax.jms.TemporaryQueue;
 import javax.jms.Topic;
+import java.util.ArrayList;
+import java.util.List;
 
 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/advisory/AdvisoryTests.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/AdvisoryTests.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/AdvisoryTests.java
index d399eb2..0dc8b6d 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/AdvisoryTests.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/AdvisoryTests.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/advisory/ConsumerListenerTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java
index feb9bc8..20ec2d9 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/ConsumerListenerTest.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.advisory;
 
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.TimeUnit;
-
 import javax.jms.Connection;
 import javax.jms.Destination;
 import javax.jms.JMSException;
@@ -27,6 +23,9 @@ import javax.jms.Message;
 import javax.jms.MessageConsumer;
 import javax.jms.MessageListener;
 import javax.jms.Session;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.activemq.EmbeddedBrokerTestSupport;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/DestinationListenerTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/DestinationListenerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/DestinationListenerTest.java
index 1f00df7..5c968f5 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/DestinationListenerTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/DestinationListenerTest.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.advisory;
 
+import javax.jms.MessageProducer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Set;
 
-import javax.jms.Session;
-import javax.jms.MessageProducer;
-import javax.jms.TextMessage;
-
 import org.apache.activemq.ActiveMQConnection;
 import org.apache.activemq.EmbeddedBrokerTestSupport;
 import org.apache.activemq.broker.BrokerService;
@@ -34,7 +33,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import static org.hamcrest.MatcherAssert.assertThat;
-import static org.hamcrest.Matchers.*;
+import static org.hamcrest.Matchers.isIn;
 
 /**
  *
@@ -98,8 +97,7 @@ public class DestinationListenerTest extends EmbeddedBrokerTestSupport implement
       if (event.isAddOperation()) {
          LOG.info("Added:   " + destination);
          newDestinations.add(destination);
-      }
-      else {
+      } else {
          LOG.info("Removed: " + destination);
          newDestinations.remove(destination);
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/ProducerListenerTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/ProducerListenerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/ProducerListenerTest.java
index 3f443e6..7202829 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/ProducerListenerTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/ProducerListenerTest.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,14 @@
  */
 package org.apache.activemq.advisory;
 
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.TimeUnit;
-
 import javax.jms.Connection;
 import javax.jms.Destination;
 import javax.jms.JMSException;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.activemq.EmbeddedBrokerTestSupport;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/TempDestDeleteTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/TempDestDeleteTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/TempDestDeleteTest.java
index 958acd5..b10f3cb 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/TempDestDeleteTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/TempDestDeleteTest.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.advisory;
 
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
-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.jms.Topic;
+import java.util.concurrent.ArrayBlockingQueue;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.activemq.EmbeddedBrokerTestSupport;
 import org.apache.activemq.broker.region.RegionBroker;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/TempDestLoadTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/TempDestLoadTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/TempDestLoadTest.java
index 19e5edf..f3ead0b 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/TempDestLoadTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/TempDestLoadTest.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/advisory/TempQueueMemoryTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/TempQueueMemoryTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/TempQueueMemoryTest.java
index 04be79a..2b93b8b 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/TempQueueMemoryTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/advisory/TempQueueMemoryTest.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.advisory;
 
-import java.util.Vector;
-
 import javax.jms.Connection;
 import javax.jms.Destination;
 import javax.jms.JMSException;
@@ -27,6 +25,7 @@ import javax.jms.MessageListener;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
 import javax.jms.TemporaryQueue;
+import java.util.Vector;
 
 import org.apache.activemq.EmbeddedBrokerTestSupport;
 import org.apache.activemq.broker.region.RegionBroker;
@@ -65,8 +64,7 @@ public class TempQueueMemoryTest extends EmbeddedBrokerTestSupport {
                      serverSession.commit();
                   }
                   producer.close();
-               }
-               catch (Exception e) {
+               } catch (Exception e) {
                   e.printStackTrace();
                }
             }
@@ -103,13 +101,11 @@ public class TempQueueMemoryTest extends EmbeddedBrokerTestSupport {
                   consumer.close();
                   if (deleteTempQueue) {
                      replyTo.delete();
-                  }
-                  else {
+                  } else {
                      // temp queue will be cleaned up on clientConnection.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/blob/BlobTransferPolicyUriTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/BlobTransferPolicyUriTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/BlobTransferPolicyUriTest.java
index 940d03a..21fac1d 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/BlobTransferPolicyUriTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/BlobTransferPolicyUriTest.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/blob/FTPBlobDownloadStrategyTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPBlobDownloadStrategyTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPBlobDownloadStrategyTest.java
index 43e4639..87679fa 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPBlobDownloadStrategyTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPBlobDownloadStrategyTest.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.blob;
 
+import javax.jms.JMSException;
 import java.io.File;
 import java.io.FileWriter;
 import java.io.InputStream;
 import java.net.MalformedURLException;
 import java.net.URL;
 
-import javax.jms.JMSException;
-
 import org.apache.activemq.command.ActiveMQBlobMessage;
 
 public class FTPBlobDownloadStrategyTest extends FTPTestSupport {
@@ -64,8 +63,7 @@ public class FTPBlobDownloadStrategyTest extends FTPTestSupport {
          strategy.deleteFile(message);
          assertFalse(uploadFile.exists());
 
-      }
-      catch (Exception e) {
+      } catch (Exception e) {
          e.printStackTrace();
          assertTrue(false);
       }
@@ -77,12 +75,10 @@ public class FTPBlobDownloadStrategyTest extends FTPTestSupport {
       try {
          message.setURL(new URL("ftp://" + userNamePass + "_wrong:" + userNamePass + "@localhost:" + ftpPort + "/ftptest/"));
          strategy.getInputStream(message);
-      }
-      catch (JMSException e) {
+      } catch (JMSException e) {
          assertEquals("Wrong Exception", "Cant Authentificate to FTP-Server", e.getMessage());
          return;
-      }
-      catch (Exception e) {
+      } catch (Exception e) {
          System.out.println(e);
          assertTrue("Wrong Exception " + e, false);
          return;
@@ -97,12 +93,10 @@ public class FTPBlobDownloadStrategyTest extends FTPTestSupport {
       try {
          message.setURL(new URL("ftp://" + userNamePass + ":" + userNamePass + "@localhost:" + 422 + "/ftptest/"));
          strategy.getInputStream(message);
-      }
-      catch (JMSException e) {
+      } catch (JMSException e) {
          assertEquals("Wrong Exception", "Problem connecting the FTP-server", e.getMessage());
          return;
-      }
-      catch (Exception e) {
+      } catch (Exception e) {
          e.printStackTrace();
          assertTrue("Wrong Exception " + e, false);
          return;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPBlobTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPBlobTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPBlobTest.java
index 57387fb..20958f1 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPBlobTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPBlobTest.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,14 @@
  */
 package org.apache.activemq.blob;
 
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.InputStream;
-
 import javax.jms.Message;
 import javax.jms.MessageConsumer;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.InputStream;
 
 import org.apache.activemq.ActiveMQSession;
 import org.apache.activemq.BlobMessage;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPBlobUploadStrategyTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPBlobUploadStrategyTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPBlobUploadStrategyTest.java
index b8238c7..29306c6 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPBlobUploadStrategyTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPBlobUploadStrategyTest.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,12 @@
  */
 package org.apache.activemq.blob;
 
+import javax.jms.JMSException;
+import javax.jms.Session;
 import java.io.BufferedWriter;
 import java.io.File;
 import java.io.FileWriter;
 
-import javax.jms.JMSException;
-import javax.jms.Session;
-
 import org.apache.activemq.ActiveMQConnection;
 import org.apache.activemq.ActiveMQSession;
 import org.apache.activemq.command.ActiveMQBlobMessage;
@@ -64,8 +63,7 @@ public class FTPBlobUploadStrategyTest extends FTPTestSupport {
       message.setJMSMessageID("testmessage");
       try {
          message.onSend();
-      }
-      catch (JMSException e) {
+      } catch (JMSException e) {
          e.printStackTrace();
          return;
       }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPTestSupport.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPTestSupport.java
index 0793b04..84c59a3 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPTestSupport.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FTPTestSupport.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.blob;
 
+import javax.jms.Connection;
 import java.io.File;
 import java.util.ArrayList;
 import java.util.List;
 
-import javax.jms.Connection;
-
 import org.apache.activemq.EmbeddedBrokerTestSupport;
 import org.apache.activemq.util.IOHelper;
 import org.apache.ftpserver.FtpServer;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FilesystemBlobTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FilesystemBlobTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FilesystemBlobTest.java
index 51949bb..7f0a769 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FilesystemBlobTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/blob/FilesystemBlobTest.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,15 @@
  */
 package org.apache.activemq.blob;
 
-import java.io.BufferedWriter;
-import java.io.File;
-import java.io.FileWriter;
-import java.io.InputStream;
-
 import javax.jms.Connection;
 import javax.jms.Message;
 import javax.jms.MessageConsumer;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.InputStream;
 
 import org.apache.activemq.ActiveMQSession;
 import org.apache.activemq.BlobMessage;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerBenchmark.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerBenchmark.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerBenchmark.java
index ddb46c8..0326596 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerBenchmark.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerBenchmark.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,
@@ -121,18 +121,15 @@ public class BrokerBenchmark extends BrokerTestSupport {
 
                      if (msg != null) {
                         connection.send(createAck(consumerInfo, msg, counter, MessageAck.STANDARD_ACK_TYPE));
-                     }
-                     else if (receiveCounter.get() < consumeCount) {
+                     } else if (receiveCounter.get() < consumeCount) {
                         LOG.info("Consumer stall, waiting for message #" + receiveCounter.get() + 1);
                      }
                   }
 
                   connection.send(closeConsumerInfo(consumerInfo));
-               }
-               catch (Throwable e) {
+               } catch (Throwable e) {
                   e.printStackTrace();
-               }
-               finally {
+               } finally {
                   consumersFinished.release();
                }
             }
@@ -167,11 +164,9 @@ public class BrokerBenchmark extends BrokerTestSupport {
                      connection.send(message);
                      printer.increment();
                   }
-               }
-               catch (Throwable e) {
+               } catch (Throwable e) {
                   e.printStackTrace();
-               }
-               finally {
+               } finally {
                   producersFinished.release();
                }
             }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerRedeliveryTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerRedeliveryTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerRedeliveryTest.java
index a34fc90..8b2692d 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerRedeliveryTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerRedeliveryTest.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,11 @@
  */
 package org.apache.activemq.broker;
 
-import java.util.concurrent.TimeUnit;
 import javax.jms.Message;
 import javax.jms.MessageConsumer;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.activemq.ActiveMQConnection;
 import org.apache.activemq.ActiveMQConnectionFactory;
@@ -92,8 +92,7 @@ public class BrokerRedeliveryTest extends org.apache.activemq.TestSupport {
          assertNotNull("Got message from dql", dlqMessage);
          assertEquals("message matches", message.getStringProperty("data"), dlqMessage.getStringProperty("data"));
          consumerSession.commit();
-      }
-      else {
+      } else {
          // consume/commit ok
          message = consumer.receive(3000);
          assertNotNull("got message", message);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerRestartTestSupport.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerRestartTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerRestartTestSupport.java
index be5720c..c09b3e7 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerRestartTestSupport.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerRestartTestSupport.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/broker/BrokerServiceTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerServiceTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerServiceTest.java
index 2611c41..5a22421 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerServiceTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerServiceTest.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/broker/BrokerTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerTest.java
index dbe90e7..861e360 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerTest.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.broker;
 
+import javax.jms.DeliveryMode;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.TimeUnit;
 
-import javax.jms.DeliveryMode;
-
 import junit.framework.Test;
 
 import org.apache.activemq.broker.artemiswrapper.ArtemisBrokerWrapper;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerTestSupport.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerTestSupport.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerTestSupport.java
index e79d511..d7e0ef3 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerTestSupport.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/BrokerTestSupport.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.broker;
 
+import javax.jms.DeliveryMode;
+import javax.jms.MessageNotWriteableException;
 import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;
 import java.io.File;
@@ -25,9 +27,6 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.concurrent.TimeUnit;
 
-import javax.jms.DeliveryMode;
-import javax.jms.MessageNotWriteableException;
-
 import org.apache.activemq.CombinationTestSupport;
 import org.apache.activemq.broker.region.RegionBroker;
 import org.apache.activemq.broker.region.policy.FixedCountSubscriptionRecoveryPolicy;
@@ -147,8 +146,7 @@ public class BrokerTestSupport extends CombinationTestSupport {
       message.setPersistent(false);
       try {
          message.setText("Test Message Payload.");
-      }
-      catch (MessageNotWriteableException e) {
+      } catch (MessageNotWriteableException e) {
       }
       return message;
    }
@@ -261,12 +259,10 @@ public class BrokerTestSupport extends CombinationTestSupport {
             if (md.getMessage() != null) {
                i++;
                connection.send(createAck(consumerInfo, md.getMessage(), 1, MessageAck.STANDARD_ACK_TYPE));
-            }
-            else {
+            } else {
                break;
             }
-         }
-         else {
+         } else {
             skipped.add(m);
          }
          m = connection.getDispatchQueue().poll(maxWait, TimeUnit.MILLISECONDS);
@@ -296,8 +292,7 @@ public class BrokerTestSupport extends CombinationTestSupport {
          DestinationInfo info = createTempDestinationInfo(connectionInfo1, destinationType);
          connection.send(info);
          return info.getDestination();
-      }
-      else {
+      } else {
          return ActiveMQDestination.createDestination(queueName, destinationType);
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ConcurrentConnectSimulationTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ConcurrentConnectSimulationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ConcurrentConnectSimulationTest.java
index 1f83947..b52d37b 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ConcurrentConnectSimulationTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/ConcurrentConnectSimulationTest.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/broker/CreateDestinationsOnStartupViaXBeanTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/CreateDestinationsOnStartupViaXBeanTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/CreateDestinationsOnStartupViaXBeanTest.java
index c5fc22a..85dd17e 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/CreateDestinationsOnStartupViaXBeanTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/CreateDestinationsOnStartupViaXBeanTest.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/broker/DedicatedTaskRunnerBrokerTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/DedicatedTaskRunnerBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/DedicatedTaskRunnerBrokerTest.java
index 5a71517..156339f 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/DedicatedTaskRunnerBrokerTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/DedicatedTaskRunnerBrokerTest.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/broker/DoubleSubscriptionTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/DoubleSubscriptionTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/DoubleSubscriptionTest.java
index 1f8d1ae..b0bafe9 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/DoubleSubscriptionTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/DoubleSubscriptionTest.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/broker/DurablePersistentFalseRestartTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/DurablePersistentFalseRestartTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/DurablePersistentFalseRestartTest.java
index 1d1c7cf..3cec506 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/DurablePersistentFalseRestartTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/DurablePersistentFalseRestartTest.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/broker/JdbcXARecoveryBrokerTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/JdbcXARecoveryBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/JdbcXARecoveryBrokerTest.java
index 3065034..467519f 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/JdbcXARecoveryBrokerTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/JdbcXARecoveryBrokerTest.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,
@@ -69,8 +69,7 @@ public class JdbcXARecoveryBrokerTest extends XARecoveryBrokerTest {
       try {
          ds.setShutdownDatabase("shutdown");
          ds.getConnection();
-      }
-      catch (Exception ignored) {
+      } catch (Exception ignored) {
       }
 
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ec48f9ed/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/Main.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/Main.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/Main.java
index 4fa4174..d5bfc39 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/Main.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/Main.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,
@@ -73,13 +73,11 @@ public final class Main {
             session.createConsumer(new ActiveMQQueue("Orders.MSFT"), "price > 100");
             Session session2 = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
             session2.createConsumer(new ActiveMQQueue("Orders.MSFT"), "price > 200");
-         }
-         else {
+         } else {
             // Lets wait for the broker
             broker.waitUntilStopped();
          }
-      }
-      catch (Exception e) {
+      } catch (Exception e) {
          System.out.println("Failed: " + 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/broker/MarshallingBrokerTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/MarshallingBrokerTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/MarshallingBrokerTest.java
index 0733e39..52ba940 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/MarshallingBrokerTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/MarshallingBrokerTest.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/broker/MessageExpirationTest.java
----------------------------------------------------------------------
diff --git a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/MessageExpirationTest.java b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/MessageExpirationTest.java
index f4f1b0e..6d5ef5c 100644
--- a/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/MessageExpirationTest.java
+++ b/tests/activemq5-unit-tests/src/test/java/org/apache/activemq/broker/MessageExpirationTest.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,
@@ -116,8 +116,7 @@ public class MessageExpirationTest extends BrokerTestSupport {
                connection.send(m2);
                connection.send(m3);
                connection.send(m4);
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                e.printStackTrace();
             }
          }