activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r564057 [10/13] - in /activemq/trunk/activemq-core/src: main/java/org/apache/activemq/ main/java/org/apache/activemq/advisory/ main/java/org/apache/activemq/blob/ main/java/org/apache/activemq/broker/ main/java/org/apache/activemq/broker/ft...
Date Thu, 09 Aug 2007 00:34:40 GMT
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ZeroPrefetchConsumerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ZeroPrefetchConsumerTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ZeroPrefetchConsumerTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/ZeroPrefetchConsumerTest.java Wed Aug  8 17:34:07 2007
@@ -16,11 +16,6 @@
  */
 package org.apache.activemq;
 
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.spring.SpringConsumer;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import javax.jms.Connection;
 import javax.jms.JMSException;
 import javax.jms.Message;
@@ -30,6 +25,11 @@
 import javax.jms.Queue;
 import javax.jms.Session;
 import javax.jms.TextMessage;
+
+import org.apache.activemq.command.ActiveMQQueue;
+import org.apache.activemq.spring.SpringConsumer;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * @version $Revision$

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempDestDeleteTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempDestDeleteTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempDestDeleteTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/advisory/TempDestDeleteTest.java Wed Aug  8 17:34:07 2007
@@ -16,6 +16,10 @@
  */
 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;
@@ -29,10 +33,6 @@
 import org.apache.activemq.broker.region.RegionBroker;
 import org.apache.activemq.command.ActiveMQTempQueue;
 import org.apache.activemq.command.ActiveMQTempTopic;
-
-import java.util.concurrent.ArrayBlockingQueue;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.TimeUnit;
 
 /**
  * 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/blob/DefaultBlobUploadStrategyTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/blob/DefaultBlobUploadStrategyTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/blob/DefaultBlobUploadStrategyTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/blob/DefaultBlobUploadStrategyTest.java Wed Aug  8 17:34:07 2007
@@ -1,13 +1,12 @@
 package org.apache.activemq.blob;
 
+import java.io.BufferedWriter;
 import java.io.File;
-import java.io.InputStream;
 import java.io.FileWriter;
-import java.io.BufferedWriter;
+import java.io.InputStream;
 import java.net.URL;
 
 import junit.framework.TestCase;
-
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.command.ActiveMQBlobMessage;
 import org.apache.activemq.command.MessageId;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerBenchmark.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerBenchmark.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerBenchmark.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerBenchmark.java Wed Aug  8 17:34:07 2007
@@ -54,8 +54,7 @@
     public boolean deliveryMode;
 
     public void initCombosForTestPerformance() {
-        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"),
-                                                          new ActiveMQTopic("TEST")});
+        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST")});
         addCombinationValues("PRODUCER_COUNT", new Object[] {new Integer("1"), new Integer("10")});
         addCombinationValues("CONSUMER_COUNT", new Object[] {new Integer("1"), new Integer("10")});
         addCombinationValues("CONSUMER_COUNT", new Object[] {new Integer("1"), new Integer("10")});
@@ -64,13 +63,12 @@
 
     public void testPerformance() throws Exception {
 
-        log.info("Running Benchmark for destination=" + destination + ", producers=" + PRODUCER_COUNT
-                 + ", consumers=" + CONSUMER_COUNT + ", deliveryMode=" + deliveryMode);
+        log.info("Running Benchmark for destination=" + destination + ", producers=" + PRODUCER_COUNT + ", consumers=" + CONSUMER_COUNT + ", deliveryMode=" + deliveryMode);
         final int CONSUME_COUNT = destination.isTopic() ? CONSUMER_COUNT * PRODUCE_COUNT : PRODUCE_COUNT;
 
-        final Semaphore consumersStarted = new Semaphore(1 - (CONSUMER_COUNT));
-        final Semaphore producersFinished = new Semaphore(1 - (PRODUCER_COUNT));
-        final Semaphore consumersFinished = new Semaphore(1 - (CONSUMER_COUNT));
+        final Semaphore consumersStarted = new Semaphore(1 - CONSUMER_COUNT);
+        final Semaphore producersFinished = new Semaphore(1 - PRODUCER_COUNT);
+        final Semaphore consumersFinished = new Semaphore(1 - CONSUMER_COUNT);
         final ProgressPrinter printer = new ProgressPrinter(PRODUCE_COUNT + CONSUME_COUNT, 10);
 
         // Start a producer and consumer
@@ -121,8 +119,7 @@
                             }
 
                             if (msg != null) {
-                                connection.send(createAck(consumerInfo, msg, counter,
-                                                          MessageAck.STANDARD_ACK_TYPE));
+                                connection.send(createAck(consumerInfo, msg, counter, MessageAck.STANDARD_ACK_TYPE));
                             } else if (receiveCounter.get() < CONSUME_COUNT) {
                                 log.info("Consumer stall, waiting for message #" + receiveCounter.get() + 1);
                             }
@@ -179,8 +176,7 @@
         consumersFinished.acquire();
         long end2 = System.currentTimeMillis();
 
-        log.info("Results for destination=" + destination + ", producers=" + PRODUCER_COUNT + ", consumers="
-                 + CONSUMER_COUNT + ", deliveryMode=" + deliveryMode);
+        log.info("Results for destination=" + destination + ", producers=" + PRODUCER_COUNT + ", consumers=" + CONSUMER_COUNT + ", deliveryMode=" + deliveryMode);
         log.info("Produced at messages/sec: " + (PRODUCE_COUNT * 1000.0 / (end1 - start)));
         log.info("Consumed at messages/sec: " + (CONSUME_COUNT * 1000.0 / (end2 - start)));
         profilerPause("Benchmark done.  Stop profiler ");

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerRestartTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerRestartTestSupport.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerRestartTestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerRestartTestSupport.java Wed Aug  8 17:34:07 2007
@@ -16,9 +16,6 @@
  */
 package org.apache.activemq.broker;
 
-import java.io.IOException;
-import java.net.URISyntaxException;
-
 import org.apache.activemq.store.PersistenceAdapter;
 
 public class BrokerRestartTestSupport extends BrokerTestSupport {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTestSupport.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/BrokerTestSupport.java Wed Aug  8 17:34:07 2007
@@ -23,6 +23,7 @@
 import java.net.URI;
 import java.util.ArrayList;
 import java.util.Iterator;
+import java.util.concurrent.TimeUnit;
 
 import javax.jms.DeliveryMode;
 import javax.jms.MessageNotWriteableException;
@@ -54,8 +55,6 @@
 import org.apache.activemq.store.PersistenceAdapter;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import java.util.concurrent.TimeUnit;
 
 public class BrokerTestSupport extends CombinationTestSupport {
 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/CreateDestinationsOnStartupViaXBeanTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/CreateDestinationsOnStartupViaXBeanTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/CreateDestinationsOnStartupViaXBeanTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/CreateDestinationsOnStartupViaXBeanTest.java Wed Aug  8 17:34:07 2007
@@ -16,14 +16,14 @@
  */
 package org.apache.activemq.broker;
 
+import java.net.URI;
+import java.util.Set;
+
 import org.apache.activemq.EmbeddedBrokerTestSupport;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.command.ActiveMQTopic;
 import org.apache.activemq.xbean.XBeanBrokerFactory;
-
-import java.net.URI;
-import java.util.Set;
 
 /**
  * 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/Main.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/Main.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/Main.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/Main.java Wed Aug  8 17:34:07 2007
@@ -16,14 +16,14 @@
  */
 package org.apache.activemq.broker;
 
+import javax.jms.Connection;
+import javax.jms.MessageConsumer;
+import javax.jms.Session;
+
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.jmx.ManagementContext;
 import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.demo.DefaultQueueSender;
-
-import javax.jms.Connection;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
 
 /**
  * A helper class which can be handy for running a broker in your IDE from the

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/QueueSubscriptionTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/QueueSubscriptionTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/QueueSubscriptionTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/QueueSubscriptionTest.java Wed Aug  8 17:34:07 2007
@@ -16,8 +16,8 @@
  */
 package org.apache.activemq.broker;
 
-import org.apache.activemq.JmsMultipleClientsTestSupport;
 import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.JmsMultipleClientsTestSupport;
 import org.apache.activemq.command.ActiveMQDestination;
 
 public class QueueSubscriptionTest extends JmsMultipleClientsTestSupport {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ReconnectWithJMXEnabledTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ReconnectWithJMXEnabledTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ReconnectWithJMXEnabledTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/ReconnectWithJMXEnabledTest.java Wed Aug  8 17:34:07 2007
@@ -16,14 +16,14 @@
  */
 package org.apache.activemq.broker;
 
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-
 import javax.jms.Connection;
 import javax.jms.Destination;
 import javax.jms.Message;
 import javax.jms.MessageConsumer;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
+
+import org.apache.activemq.EmbeddedBrokerTestSupport;
 
 /**
  * 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubBroker.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubBroker.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubBroker.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubBroker.java Wed Aug  8 17:34:07 2007
@@ -17,6 +17,11 @@
 
 package org.apache.activemq.broker;
 
+import java.net.URI;
+import java.util.LinkedList;
+import java.util.Map;
+import java.util.Set;
+
 import org.apache.activemq.broker.region.Destination;
 import org.apache.activemq.broker.region.MessageReference;
 import org.apache.activemq.broker.region.Subscription;
@@ -38,11 +43,6 @@
 import org.apache.activemq.command.SessionInfo;
 import org.apache.activemq.command.TransactionId;
 import org.apache.activemq.kaha.Store;
-
-import java.net.URI;
-import java.util.LinkedList;
-import java.util.Map;
-import java.util.Set;
 
 public class StubBroker implements Broker {
     public LinkedList addConnectionData = new LinkedList();

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubConnection.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubConnection.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubConnection.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/StubConnection.java Wed Aug  8 17:34:07 2007
@@ -17,6 +17,8 @@
 package org.apache.activemq.broker;
 
 import java.io.IOException;
+import java.util.concurrent.BlockingQueue;
+import java.util.concurrent.LinkedBlockingQueue;
 
 import org.apache.activemq.Service;
 import org.apache.activemq.command.Command;
@@ -29,9 +31,6 @@
 import org.apache.activemq.transport.TransportFactory;
 import org.apache.activemq.util.JMSExceptionSupport;
 import org.apache.activemq.util.ServiceSupport;
-
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.LinkedBlockingQueue;
 
 public class StubConnection implements Service {
 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/MBeanTest.java Wed Aug  8 17:34:07 2007
@@ -16,9 +16,8 @@
  */
 package org.apache.activemq.broker.jmx;
 
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.Topic;
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
 
 import javax.jms.Connection;
 import javax.jms.Message;
@@ -31,10 +30,9 @@
 import javax.management.openmbean.CompositeData;
 import javax.management.openmbean.TabularData;
 
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-
 import junit.textui.TestRunner;
+import org.apache.activemq.EmbeddedBrokerTestSupport;
+import org.apache.activemq.broker.BrokerService;
 
 /**
  * A test case of the various MBeans in ActiveMQ. If you want to look at the

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/PurgeTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/PurgeTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/PurgeTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/jmx/PurgeTest.java Wed Aug  8 17:34:07 2007
@@ -16,9 +16,6 @@
  */
 package org.apache.activemq.broker.jmx;
 
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.BrokerService;
-
 import javax.jms.Connection;
 import javax.jms.Message;
 import javax.jms.MessageProducer;
@@ -29,10 +26,12 @@
 import javax.management.ObjectName;
 
 import junit.textui.TestRunner;
+import org.apache.activemq.EmbeddedBrokerTestSupport;
+import org.apache.activemq.broker.BrokerService;
 
 /**
  * A specific test of Queue.purge() functionality
- *
+ * 
  * @version $Revision$
  */
 public class PurgeTest extends EmbeddedBrokerTestSupport {
@@ -65,7 +64,7 @@
 
         // Now get the QueueViewMBean and purge
         ObjectName queueViewMBeanName = assertRegisteredObjectName(domain + ":Type=Queue,Destination=" + getDestinationString() + ",BrokerName=localhost");
-        QueueViewMBean proxy = (QueueViewMBean) MBeanServerInvocationHandler.newProxyInstance(mbeanServer, queueViewMBeanName, QueueViewMBean.class, true);
+        QueueViewMBean proxy = (QueueViewMBean)MBeanServerInvocationHandler.newProxyInstance(mbeanServer, queueViewMBeanName, QueueViewMBean.class, true);
 
         long count = proxy.getQueueSize();
         assertEquals("Queue size", count, messageCount);
@@ -94,8 +93,7 @@
         ObjectName objectName = new ObjectName(name);
         if (mbeanServer.isRegistered(objectName)) {
             echo("Bean Registered: " + objectName);
-        }
-        else {
+        } else {
             fail("Could not find MBean!: " + objectName);
         }
         return objectName;
@@ -121,7 +119,7 @@
         answer.setUseJmx(true);
         answer.setEnableStatistics(true);
         answer.setPersistent(false);
-        answer.addConnector(bindAddress);   
+        answer.addConnector(bindAddress);
         return answer;
     }
 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTest.java Wed Aug  8 17:34:07 2007
@@ -16,13 +16,13 @@
  */
 package org.apache.activemq.broker.policy;
 
+import javax.jms.Destination;
+import javax.jms.Message;
+
 import org.apache.activemq.ActiveMQConnection;
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.RedeliveryPolicy;
 import org.apache.activemq.command.ActiveMQQueue;
-
-import javax.jms.Destination;
-import javax.jms.Message;
 
 /**
  * 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/DeadLetterTestSupport.java Wed Aug  8 17:34:07 2007
@@ -16,9 +16,6 @@
  */
 package org.apache.activemq.broker.policy;
 
-import org.apache.activemq.TestSupport;
-import org.apache.activemq.broker.BrokerService;
-
 import javax.jms.Connection;
 import javax.jms.DeliveryMode;
 import javax.jms.Destination;
@@ -29,6 +26,9 @@
 import javax.jms.Session;
 import javax.jms.TextMessage;
 import javax.jms.Topic;
+
+import org.apache.activemq.TestSupport;
+import org.apache.activemq.broker.BrokerService;
 
 /**
  * @version $Revision$

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterTest.java Wed Aug  8 17:34:07 2007
@@ -16,21 +16,19 @@
  */
 package org.apache.activemq.broker.policy;
 
+import javax.jms.Destination;
+
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.region.policy.IndividualDeadLetterStrategy;
 import org.apache.activemq.broker.region.policy.PolicyEntry;
 import org.apache.activemq.broker.region.policy.PolicyMap;
 import org.apache.activemq.command.ActiveMQQueue;
 
-import javax.jms.Destination;
-
 /**
- *
  * @version $Revision$
  */
 public class IndividualDeadLetterTest extends DeadLetterTest {
 
-
     protected BrokerService createBroker() throws Exception {
         BrokerService broker = super.createBroker();
 
@@ -46,7 +44,7 @@
     }
 
     protected Destination createDlqDestination() {
-        String prefix = (topic) ? "ActiveMQ.DLQ.Topic.": "ActiveMQ.DLQ.Queue.";
+        String prefix = topic ? "ActiveMQ.DLQ.Topic." : "ActiveMQ.DLQ.Queue.";
         return new ActiveMQQueue(prefix + getClass().getName() + "." + getName());
     }
 }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterViaXmlTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterViaXmlTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterViaXmlTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/IndividualDeadLetterViaXmlTest.java Wed Aug  8 17:34:07 2007
@@ -16,12 +16,12 @@
  */
 package org.apache.activemq.broker.policy;
 
+import javax.jms.Destination;
+
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.xbean.BrokerFactoryBean;
 import org.springframework.core.io.ClassPathResource;
-
-import javax.jms.Destination;
 
 /**
  *

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/NoConsumerDeadLetterTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/NoConsumerDeadLetterTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/NoConsumerDeadLetterTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/NoConsumerDeadLetterTest.java Wed Aug  8 17:34:07 2007
@@ -16,14 +16,14 @@
  */
 package org.apache.activemq.broker.policy;
 
+import javax.jms.Destination;
+import javax.jms.Message;
+
 import org.apache.activemq.advisory.AdvisorySupport;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.region.policy.PolicyEntry;
 import org.apache.activemq.broker.region.policy.PolicyMap;
 import org.apache.activemq.command.ActiveMQDestination;
-
-import javax.jms.Destination;
-import javax.jms.Message;
 
 /**
  * @version $Revision$

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/RoundRobinDispatchPolicyTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/RoundRobinDispatchPolicyTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/RoundRobinDispatchPolicyTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/RoundRobinDispatchPolicyTest.java Wed Aug  8 17:34:07 2007
@@ -16,17 +16,17 @@
  */
 package org.apache.activemq.broker.policy;
 
-import org.apache.activemq.broker.QueueSubscriptionTest;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.broker.region.policy.PolicyEntry;
-import org.apache.activemq.broker.region.policy.RoundRobinDispatchPolicy;
-import org.apache.activemq.broker.region.policy.PolicyMap;
-
 import javax.jms.Connection;
 import javax.jms.Destination;
 import javax.jms.MessageConsumer;
 import javax.jms.Session;
 
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.broker.QueueSubscriptionTest;
+import org.apache.activemq.broker.region.policy.PolicyEntry;
+import org.apache.activemq.broker.region.policy.PolicyMap;
+import org.apache.activemq.broker.region.policy.RoundRobinDispatchPolicy;
+
 public class RoundRobinDispatchPolicyTest extends QueueSubscriptionTest {
 
     protected BrokerService createBroker() throws Exception {
@@ -47,7 +47,8 @@
         super.testOneProducerTwoConsumersSmallMessagesOnePrefetch();
 
         // Ensure that each consumer should have received at least one message
-        // We cannot guarantee that messages will be equally divided, since prefetch is one
+        // We cannot guarantee that messages will be equally divided, since
+        // prefetch is one
         assertEachConsumerReceivedAtLeastXMessages(1);
     }
 
@@ -60,7 +61,8 @@
         super.testOneProducerTwoConsumersLargeMessagesOnePrefetch();
 
         // Ensure that each consumer should have received at least one message
-        // We cannot guarantee that messages will be equally divided, since prefetch is one
+        // We cannot guarantee that messages will be equally divided, since
+        // prefetch is one
         assertEachConsumerReceivedAtLeastXMessages(1);
     }
 
@@ -72,7 +74,8 @@
     public void testOneProducerManyConsumersFewMessages() throws Exception {
         super.testOneProducerManyConsumersFewMessages();
 
-        // Since there are more consumers, each consumer should have received at most one message only
+        // Since there are more consumers, each consumer should have received at
+        // most one message only
         assertMessagesDividedAmongConsumers();
     }
 
@@ -85,23 +88,23 @@
         super.testManyProducersManyConsumers();
         assertMessagesDividedAmongConsumers();
     }
-    
+
     public void testOneProducerTwoMatchingConsumersOneNotMatchingConsumer() throws Exception {
-    // Create consumer that won't consume any message
+        // Create consumer that won't consume any message
         createMessageConsumer(createConnectionFactory().createConnection(), createDestination(), "JMSPriority<1");
         super.testOneProducerTwoConsumersSmallMessagesLargePrefetch();
         assertMessagesDividedAmongConsumers();
     }
-    	
+
     protected MessageConsumer createMessageConsumer(Connection conn, Destination dest, String selector) throws Exception {
         connections.add(conn);
-    
+
         Session sess = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
-    	final MessageConsumer consumer = sess.createConsumer(dest, selector);
-    	conn.start();
-    	
-    	return consumer;
-    }    
+        final MessageConsumer consumer = sess.createConsumer(dest, selector);
+        conn.start();
+
+        return consumer;
+    }
 
     public void assertMessagesDividedAmongConsumers() {
         assertEachConsumerReceivedAtLeastXMessages((messageCount * producerCount) / consumerCount);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/SimpleDispatchPolicyTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/SimpleDispatchPolicyTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/SimpleDispatchPolicyTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/policy/SimpleDispatchPolicyTest.java Wed Aug  8 17:34:07 2007
@@ -16,16 +16,15 @@
  */
 package org.apache.activemq.broker.policy;
 
-import org.apache.activemq.broker.QueueSubscriptionTest;
+import java.util.Iterator;
+
 import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.broker.QueueSubscriptionTest;
 import org.apache.activemq.broker.region.policy.FixedCountSubscriptionRecoveryPolicy;
 import org.apache.activemq.broker.region.policy.PolicyEntry;
 import org.apache.activemq.broker.region.policy.PolicyMap;
 import org.apache.activemq.broker.region.policy.SimpleDispatchPolicy;
 import org.apache.activemq.util.MessageIdList;
-
-import java.util.Iterator;
-import java.util.List;
 
 public class SimpleDispatchPolicyTest extends QueueSubscriptionTest {
 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorQueueStoreTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorQueueStoreTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorQueueStoreTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/cursors/CursorQueueStoreTest.java Wed Aug  8 17:34:07 2007
@@ -20,10 +20,10 @@
 import javax.jms.JMSException;
 import javax.jms.MessageConsumer;
 import javax.jms.Session;
+
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.broker.region.policy.PolicyEntry;
 import org.apache.activemq.broker.region.policy.PolicyMap;
-import org.apache.activemq.broker.region.policy.StorePendingDurableSubscriberMessageStoragePolicy;
 import org.apache.activemq.broker.region.policy.StorePendingQueueMessageStoragePolicy;
 
 /**

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/group/MessageGroupMapTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/group/MessageGroupMapTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/group/MessageGroupMapTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/region/group/MessageGroupMapTest.java Wed Aug  8 17:34:07 2007
@@ -16,11 +16,10 @@
  */
 package org.apache.activemq.broker.region.group;
 
+import junit.framework.TestCase;
 import org.apache.activemq.command.ConnectionId;
 import org.apache.activemq.command.ConsumerId;
 import org.apache.activemq.command.SessionId;
-
-import junit.framework.TestCase;
 
 /**
  * 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/util/LoggingBrokerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/util/LoggingBrokerTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/util/LoggingBrokerTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/util/LoggingBrokerTest.java Wed Aug  8 17:34:07 2007
@@ -16,13 +16,13 @@
  */
 package org.apache.activemq.broker.util;
 
+import java.net.URI;
+
 import org.apache.activemq.broker.BrokerFactory;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.test.JmsTopicSendReceiveTest;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
-
-import java.net.URI;
 
 /**
  * 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeQueueTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeQueueTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeQueueTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeQueueTest.java Wed Aug  8 17:34:07 2007
@@ -16,24 +16,24 @@
  */
 package org.apache.activemq.broker.virtual;
 
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.spring.ConsumerBean;
-import org.apache.activemq.xbean.XBeanBrokerFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.net.URI;
 
 import javax.jms.Connection;
 import javax.jms.Destination;
+import javax.jms.JMSException;
 import javax.jms.MessageConsumer;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
 import javax.jms.TextMessage;
-import javax.jms.JMSException;
 
-import java.net.URI;
+import org.apache.activemq.EmbeddedBrokerTestSupport;
+import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.command.ActiveMQQueue;
+import org.apache.activemq.command.ActiveMQTopic;
+import org.apache.activemq.spring.ConsumerBean;
+import org.apache.activemq.xbean.XBeanBrokerFactory;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 /**
  * 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeTopicTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeTopicTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeTopicTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/CompositeTopicTest.java Wed Aug  8 17:34:07 2007
@@ -16,10 +16,10 @@
  */
 package org.apache.activemq.broker.virtual;
 
+import javax.jms.Destination;
+
 import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.command.ActiveMQTopic;
-
-import javax.jms.Destination;
 
 /**
  *

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubTest.java Wed Aug  8 17:34:07 2007
@@ -16,15 +16,15 @@
  */
 package org.apache.activemq.broker.virtual;
 
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTopic;
-import org.apache.activemq.spring.ConsumerBean;
-
 import javax.jms.Connection;
 import javax.jms.MessageConsumer;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
+
+import org.apache.activemq.EmbeddedBrokerTestSupport;
+import org.apache.activemq.command.ActiveMQQueue;
+import org.apache.activemq.command.ActiveMQTopic;
+import org.apache.activemq.spring.ConsumerBean;
 
 /**
  * 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubUsingXBeanTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubUsingXBeanTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubUsingXBeanTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/virtual/VirtualTopicPubSubUsingXBeanTest.java Wed Aug  8 17:34:07 2007
@@ -16,10 +16,10 @@
  */
 package org.apache.activemq.broker.virtual;
 
+import java.net.URI;
+
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.xbean.XBeanBrokerFactory;
-
-import java.net.URI;
 
 /**
  *

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/CraigsBugTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/CraigsBugTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/CraigsBugTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/CraigsBugTest.java Wed Aug  8 17:34:07 2007
@@ -16,22 +16,21 @@
  */
 package org.apache.activemq.bugs;
 
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.EmbeddedBrokerTestSupport;
-import org.apache.activemq.command.ActiveMQQueue;
-
 import javax.jms.Connection;
 import javax.jms.JMSException;
 import javax.jms.Message;
 import javax.jms.MessageConsumer;
 import javax.jms.Session;
 
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.EmbeddedBrokerTestSupport;
+import org.apache.activemq.command.ActiveMQQueue;
+
 /**
- * 
  * @version $Revision: $
  */
 public class CraigsBugTest extends EmbeddedBrokerTestSupport {
-    
+
     public void testConnectionFactory() throws Exception {
         final ActiveMQConnectionFactory cf = new ActiveMQConnectionFactory("tcp://localhost:61616");
         final ActiveMQQueue queue = new ActiveMQQueue("testqueue");
@@ -43,8 +42,7 @@
                     Session session = conn.createSession(false, 1);
                     MessageConsumer consumer = session.createConsumer(queue, null);
                     Message msg = consumer.receive(1000);
-                }
-                catch (JMSException e) {
+                } catch (JMSException e) {
                     e.printStackTrace();
                 }
             }
@@ -56,8 +54,7 @@
             synchronized (this) {
                 wait(3000);
             }
-        }
-        catch (InterruptedException e) {
+        } catch (InterruptedException e) {
             e.printStackTrace();
         }
     }
@@ -66,6 +63,5 @@
         bindAddress = "tcp://localhost:61616";
         super.setUp();
     }
-    
-    
+
 }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/JmsDurableTopicSlowReceiveTest.java Wed Aug  8 17:34:07 2007
@@ -14,8 +14,8 @@
 
 package org.apache.activemq.bugs;
 
-import java.io.File;
 import java.util.Properties;
+
 import javax.jms.BytesMessage;
 import javax.jms.Connection;
 import javax.jms.Destination;
@@ -25,10 +25,9 @@
 import javax.jms.Session;
 import javax.jms.Topic;
 import javax.jms.TopicSubscriber;
+
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.BrokerService;
-import org.apache.activemq.store.jdbc.JDBCPersistenceAdapter;
-import org.apache.activemq.store.kahadaptor.KahaPersistenceAdapter;
 import org.apache.activemq.test.JmsTopicSendReceiveTest;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/SlowConsumerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/SlowConsumerTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/SlowConsumerTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/SlowConsumerTest.java Wed Aug  8 17:34:07 2007
@@ -30,7 +30,6 @@
 import javax.jms.TextMessage;
 
 import junit.framework.TestCase;
-
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.command.ActiveMQQueue;
@@ -75,8 +74,7 @@
                     }
                     producer.close();
                     session.close();
-                }
-                catch (Throwable ex) {
+                } catch (Throwable ex) {
                     ex.printStackTrace();
                 }
             }
@@ -93,12 +91,12 @@
                     MessageConsumer consumer = session.createConsumer(new ActiveMQQueue(getDestinationName()));
                     int diff = 0;
                     while (messagesCount != MESSAGES_COUNT) {
-                        Message msg = consumer.receive(messageReceiveTimeout );
+                        Message msg = consumer.receive(messageReceiveTimeout);
                         if (msg == null) {
                             log.warn("Got null message at count: " + messagesCount + ". Continuing...");
                             break;
                         }
-                        String text = ((TextMessage) msg).getText();
+                        String text = ((TextMessage)msg).getText();
                         int currentMsgIdx = Integer.parseInt(text);
                         log.debug("Received: " + text + " messageCount: " + messagesCount);
                         msg.acknowledge();
@@ -110,10 +108,9 @@
                         if (messagesCount % messageLogFrequency == 0) {
                             log.info("Received: " + messagesCount + " messages so far");
                         }
-                        //Thread.sleep(70);
+                        // Thread.sleep(70);
                     }
-                }
-                catch (Throwable ex) {
+                } catch (Throwable ex) {
                     ex.printStackTrace();
                 }
             }
@@ -135,21 +132,19 @@
     }
 
     public String receiveFrame(long timeOut) throws Exception {
-        stompSocket.setSoTimeout((int) timeOut);
+        stompSocket.setSoTimeout((int)timeOut);
         InputStream is = stompSocket.getInputStream();
         int c = 0;
         for (;;) {
             c = is.read();
             if (c < 0) {
                 throw new IOException("socket closed.");
-            }
-            else if (c == 0) {
+            } else if (c == 0) {
                 c = is.read();
                 byte[] ba = inputBuffer.toByteArray();
                 inputBuffer.reset();
                 return new String(ba, "UTF-8");
-            }
-            else {
+            } else {
                 inputBuffer.write(c);
             }
         }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/camel/CamelJmsTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/camel/CamelJmsTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/camel/CamelJmsTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/camel/CamelJmsTest.java Wed Aug  8 17:34:07 2007
@@ -16,15 +16,6 @@
  */
 package org.apache.activemq.camel;
 
-import junit.framework.Assert;
-import org.apache.activemq.demo.DefaultQueueSender;
-import org.apache.camel.CamelTemplate;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.spring.SpringTestSupport;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
 import javax.jms.Destination;
@@ -34,6 +25,14 @@
 import javax.jms.ObjectMessage;
 import javax.jms.Session;
 import javax.jms.TextMessage;
+
+import junit.framework.Assert;
+import org.apache.camel.CamelTemplate;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.spring.SpringTestSupport;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.springframework.context.support.ClassPathXmlApplicationContext;
 
 /**
  * @version $Revision: $

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQBytesMessageTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQBytesMessageTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQBytesMessageTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQBytesMessageTest.java Wed Aug  8 17:34:07 2007
@@ -64,7 +64,7 @@
         int len = 10;
         try {
             for (int i = 0; i < len; i++) {
-                msg.writeLong(5l);
+                msg.writeLong(5L);
             }
         } catch (JMSException ex) {
             ex.printStackTrace();
@@ -243,7 +243,7 @@
             msg.writeObject(Byte.valueOf((byte) 1));
             msg.writeObject(Short.valueOf((short) 3));
             msg.writeObject(Integer.valueOf(3));
-            msg.writeObject(Long.valueOf(300l));
+            msg.writeObject(Long.valueOf(300L));
             msg.writeObject(new Float(3.3f));
             msg.writeObject(new Double(3.3));
             msg.writeObject(new byte[3]);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQStreamMessageTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQStreamMessageTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQStreamMessageTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/ActiveMQStreamMessageTest.java Wed Aug  8 17:34:07 2007
@@ -355,7 +355,7 @@
     public void testReadLong() {
         ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
         try {
-            long test = 4l;
+            long test = 4L;
             msg.writeLong(test);
             msg.reset();
             assertTrue(msg.readLong() == test);
@@ -555,7 +555,7 @@
             msg.reset();
             assertTrue(msg.readInt() == testInt);
             msg.clearBody();
-            long testLong = 6l;
+            long testLong = 6L;
             msg.writeString(new Long(testLong).toString());
             msg.reset();
             assertTrue(msg.readLong() == testLong);
@@ -699,7 +699,7 @@
             assertTrue(((Integer)msg.readObject()).intValue() == testInt);
             msg.clearBody();
 
-            long testLong = 6l;
+            long testLong = 6L;
             msg.writeLong(testLong);
             msg.reset();
             assertTrue(((Long)msg.readObject()).longValue() == testLong);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/DataStructureTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/DataStructureTestSupport.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/DataStructureTestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/command/DataStructureTestSupport.java Wed Aug  8 17:34:07 2007
@@ -23,7 +23,6 @@
 
 import junit.framework.AssertionFailedError;
 import junit.framework.TestCase;
-
 import org.apache.activemq.CombinationTestSupport;
 import org.apache.activemq.openwire.OpenWireFormat;
 import org.apache.activemq.util.ByteSequence;
@@ -72,33 +71,32 @@
             if (componentType.isPrimitive()) {
                 boolean ok = false;
                 if (componentType == byte.class) {
-                    ok = Arrays.equals((byte[]) expect, (byte[]) was);
+                    ok = Arrays.equals((byte[])expect, (byte[])was);
                 }
                 if (componentType == char.class) {
-                    ok = Arrays.equals((char[]) expect, (char[]) was);
+                    ok = Arrays.equals((char[])expect, (char[])was);
                 }
                 if (componentType == short.class) {
-                    ok = Arrays.equals((short[]) expect, (short[]) was);
+                    ok = Arrays.equals((short[])expect, (short[])was);
                 }
                 if (componentType == int.class) {
-                    ok = Arrays.equals((int[]) expect, (int[]) was);
+                    ok = Arrays.equals((int[])expect, (int[])was);
                 }
                 if (componentType == long.class) {
-                    ok = Arrays.equals((long[]) expect, (long[]) was);
+                    ok = Arrays.equals((long[])expect, (long[])was);
                 }
                 if (componentType == double.class) {
-                    ok = Arrays.equals((double[]) expect, (double[]) was);
+                    ok = Arrays.equals((double[])expect, (double[])was);
                 }
                 if (componentType == float.class) {
-                    ok = Arrays.equals((float[]) expect, (float[]) was);
+                    ok = Arrays.equals((float[])expect, (float[])was);
                 }
                 if (!ok) {
                     throw new AssertionFailedError("Arrays not equal");
                 }
-            }
-            else {
-                Object expectArray[] = (Object[]) expect;
-                Object wasArray[] = (Object[]) was;
+            } else {
+                Object expectArray[] = (Object[])expect;
+                Object wasArray[] = (Object[])was;
                 if (expectArray.length != wasArray.length)
                     throw new AssertionFailedError("Not equals, array lengths don't match. expected: " + expectArray.length + ", was: " + wasArray.length);
                 for (int i = 0; i < wasArray.length; i++) {
@@ -106,41 +104,33 @@
                 }
 
             }
-        }
-        else if (expect instanceof Command) {
+        } else if (expect instanceof Command) {
             assertEquals(expect.getClass(), was.getClass());
             Method[] methods = expect.getClass().getMethods();
             for (int i = 0; i < methods.length; i++) {
                 Method method = methods[i];
-                if ((method.getName().startsWith("get") || method.getName().startsWith("is")) && method.getParameterTypes().length == 0
-                        && method.getReturnType() != null) {
+                if ((method.getName().startsWith("get") || method.getName().startsWith("is")) && method.getParameterTypes().length == 0 && method.getReturnType() != null) {
 
                     // Check to see if there is a setter for the method.
                     try {
                         if (method.getName().startsWith("get")) {
-                            expect.getClass().getMethod(method.getName().replaceFirst("get", "set"), new Class[] { method.getReturnType() });
+                            expect.getClass().getMethod(method.getName().replaceFirst("get", "set"), new Class[] {method.getReturnType()});
+                        } else {
+                            expect.getClass().getMethod(method.getName().replaceFirst("is", "set"), new Class[] {method.getReturnType()});
                         }
-                        else {
-                            expect.getClass().getMethod(method.getName().replaceFirst("is", "set"), new Class[] { method.getReturnType() });
-                        }
-                    }
-                    catch (Throwable ignore) {
+                    } catch (Throwable ignore) {
                         continue;
                     }
 
                     try {
                         assertEquals(method.invoke(expect, null), method.invoke(was, null));
-                    }
-                    catch (IllegalArgumentException e) {
-                    }
-                    catch (IllegalAccessException e) {
-                    }
-                    catch (InvocationTargetException e) {
+                    } catch (IllegalArgumentException e) {
+                    } catch (IllegalAccessException e) {
+                    } catch (InvocationTargetException e) {
                     }
                 }
             }
-        }
-        else {
+        } else {
             TestCase.assertEquals(expect, was);
         }
     }
@@ -149,7 +139,7 @@
         wireFormat = createWireFormat();
         super.setUp();
     }
-    
+
     protected WireFormat createWireFormat() {
         OpenWireFormat answer = new OpenWireFormat();
         answer.setCacheEnabled(cacheEnabled);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerXmlConfigFromJNDITest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerXmlConfigFromJNDITest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerXmlConfigFromJNDITest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerXmlConfigFromJNDITest.java Wed Aug  8 17:34:07 2007
@@ -16,14 +16,14 @@
  */
 package org.apache.activemq.config;
 
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsTest;
+import java.io.File;
+import java.util.Hashtable;
 
-import javax.naming.InitialContext;
 import javax.naming.Context;
+import javax.naming.InitialContext;
 
-import java.io.File;
-import java.util.Hashtable;
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsTest;
 
 /**
  * @version $Revision$

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerXmlConfigTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerXmlConfigTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerXmlConfigTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerXmlConfigTest.java Wed Aug  8 17:34:07 2007
@@ -19,8 +19,6 @@
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.test.JmsTopicSendReceiveWithTwoConnectionsTest;
 
-import java.net.URI;
-
 /**
  * @version $Revision$
  */

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/ConfigTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/ConfigTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/ConfigTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/ConfigTest.java Wed Aug  8 17:34:07 2007
@@ -181,7 +181,7 @@
             // Check transport connectors list
             // System.out.print("Checking transport connectors... ");
             List connectors = broker.getTransportConnectors();
-            assertTrue("Should have created at least 3 connectors", (connectors.size() >= 3));
+            assertTrue("Should have created at least 3 connectors", connectors.size() >= 3);
             assertTrue("1st connector should be TcpTransportServer", ((TransportConnector)connectors.get(0)).getServer() instanceof TcpTransportServer);
             assertTrue("2nd connector should be TcpTransportServer", ((TransportConnector)connectors.get(1)).getServer() instanceof TcpTransportServer);
             assertTrue("3rd connector should be TcpTransportServer", ((TransportConnector)connectors.get(2)).getServer() instanceof TcpTransportServer);

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/ConfigUsingDestinationOptions.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/ConfigUsingDestinationOptions.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/ConfigUsingDestinationOptions.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/ConfigUsingDestinationOptions.java Wed Aug  8 17:34:07 2007
@@ -16,15 +16,15 @@
  */
 package org.apache.activemq.config;
 
-import junit.framework.TestCase;
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.ActiveMQConnectionFactory;
-import org.apache.activemq.ActiveMQMessageConsumer;
-
 import javax.jms.Connection;
+import javax.jms.InvalidSelectorException;
 import javax.jms.JMSException;
 import javax.jms.Session;
-import javax.jms.InvalidSelectorException;
+
+import junit.framework.TestCase;
+import org.apache.activemq.ActiveMQConnectionFactory;
+import org.apache.activemq.ActiveMQMessageConsumer;
+import org.apache.activemq.command.ActiveMQQueue;
 
 public class ConfigUsingDestinationOptions extends TestCase {
     public void testValidSelectorConfig() throws JMSException {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/DefaultQueueSender.java Wed Aug  8 17:34:07 2007
@@ -28,12 +28,16 @@
 
 // START SNIPPET: demo
 
-import org.apache.activemq.ActiveMQConnectionFactory;
+import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
+import javax.jms.Destination;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageProducer;
+import javax.jms.QueueSession;
+import javax.jms.Session;
 
-import javax.jms.*;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
+import org.apache.activemq.ActiveMQConnectionFactory;
 
 /**
  * A simple queue sender which does not use JNDI
@@ -42,8 +46,7 @@
  */
 public class DefaultQueueSender {
 
-    private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
-            .getLog(DefaultQueueSender.class);
+    private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(DefaultQueueSender.class);
 
     public static void main(String[] args) {
 
@@ -53,7 +56,7 @@
         Connection connection = null;
         QueueSession queueSession = null;
 
-        if ((args.length < 1)) {
+        if (args.length < 1) {
             printUsage();
             System.exit(1);
         }
@@ -85,16 +88,13 @@
 
             Message message = session.createTextMessage(text);
             producer.send(message);
-        }
-        catch (JMSException e) {
+        } catch (JMSException e) {
             log.info("Exception occurred: " + e.toString());
-        }
-        finally {
+        } finally {
             if (connection != null) {
                 try {
                     connection.close();
-                }
-                catch (JMSException e) {
+                } catch (JMSException e) {
                 }
             }
         }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleConsumer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleConsumer.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleConsumer.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleConsumer.java Wed Aug  8 17:34:07 2007
@@ -37,15 +37,14 @@
 import javax.naming.NamingException;
 
 /**
- * A simple polymorphic JMS consumer which can work with Queues or Topics
- * which uses JNDI to lookup the JMS connection factory and destination
- *
+ * A simple polymorphic JMS consumer which can work with Queues or Topics which
+ * uses JNDI to lookup the JMS connection factory and destination
+ * 
  * @version $Revision: 1.2 $
  */
 public class SimpleConsumer {
-    
-    private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
-            .getLog(SimpleConsumer.class);
+
+    private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(SimpleConsumer.class);
 
     /**
      * @param args the queue used by the example
@@ -74,10 +73,8 @@
          */
         try {
             jndiContext = new InitialContext();
-        }
-        catch (NamingException e) {
-            log.info("Could not create JNDI API " +
-                    "context: " + e.toString());
+        } catch (NamingException e) {
+            log.info("Could not create JNDI API " + "context: " + e.toString());
             System.exit(1);
         }
 
@@ -85,25 +82,19 @@
          * Look up connection factory and destination.
          */
         try {
-            connectionFactory = (ConnectionFactory)
-                    jndiContext.lookup("ConnectionFactory");
-            destination = (Destination) jndiContext.lookup(destinationName);
-        }
-        catch (NamingException e) {
-            log.info("JNDI API lookup failed: " +
-                    e.toString());
+            connectionFactory = (ConnectionFactory)jndiContext.lookup("ConnectionFactory");
+            destination = (Destination)jndiContext.lookup(destinationName);
+        } catch (NamingException e) {
+            log.info("JNDI API lookup failed: " + e.toString());
             System.exit(1);
         }
 
         /*
-         * Create connection.
-         * Create session from connection; false means session is
-         * not transacted.
-         * Create receiver, then start message delivery.
-         * Receive all text messages from destination until
-         * a non-text message is received indicating end of
-         * message stream.
-         * Close connection.
+         * Create connection. Create session from connection; false means
+         * session is not transacted. Create receiver, then start message
+         * delivery. Receive all text messages from destination until a non-text
+         * message is received indicating end of message stream. Close
+         * connection.
          */
         try {
             connection = connectionFactory.createConnection();
@@ -114,24 +105,20 @@
                 Message m = consumer.receive(1);
                 if (m != null) {
                     if (m instanceof TextMessage) {
-                        TextMessage message = (TextMessage) m;
+                        TextMessage message = (TextMessage)m;
                         log.info("Reading message: " + message.getText());
-                    }
-                    else {
+                    } else {
                         break;
                     }
                 }
             }
-        }
-        catch (JMSException e) {
+        } catch (JMSException e) {
             log.info("Exception occurred: " + e);
-        }
-        finally {
+        } finally {
             if (connection != null) {
                 try {
                     connection.close();
-                }
-                catch (JMSException e) {
+                } catch (JMSException e) {
                 }
             }
         }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleProducer.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleProducer.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleProducer.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleProducer.java Wed Aug  8 17:34:07 2007
@@ -40,18 +40,18 @@
 import javax.naming.NamingException;
 
 /**
- * A simple polymorphic JMS producer which can work with Queues or Topics
- * which uses JNDI to lookup the JMS connection factory and destination
- *
+ * A simple polymorphic JMS producer which can work with Queues or Topics which
+ * uses JNDI to lookup the JMS connection factory and destination
+ * 
  * @version $Revision: 1.2 $
  */
 public class SimpleProducer {
-    
-    private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
-            .getLog(SimpleProducer.class);
+
+    private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(SimpleProducer.class);
 
     /**
-     * @param args the destination name to send to and optionally, the number of messages to send
+     * @param args the destination name to send to and optionally, the number of
+     *                messages to send
      */
     public static void main(String[] args) {
         Context jndiContext = null;
@@ -71,8 +71,7 @@
         log.info("Destination name is " + destinationName);
         if (args.length == 2) {
             NUM_MSGS = (new Integer(args[1])).intValue();
-        }
-        else {
+        } else {
             NUM_MSGS = 1;
         }
 
@@ -81,8 +80,7 @@
          */
         try {
             jndiContext = new InitialContext();
-        }
-        catch (NamingException e) {
+        } catch (NamingException e) {
             log.info("Could not create JNDI API context: " + e.toString());
             System.exit(1);
         }
@@ -91,20 +89,17 @@
          * Look up connection factory and destination.
          */
         try {
-            connectionFactory = (ConnectionFactory) jndiContext.lookup("ConnectionFactory");
-            destination = (Destination) jndiContext.lookup(destinationName);
-        }
-        catch (NamingException e) {
+            connectionFactory = (ConnectionFactory)jndiContext.lookup("ConnectionFactory");
+            destination = (Destination)jndiContext.lookup(destinationName);
+        } catch (NamingException e) {
             log.info("JNDI API lookup failed: " + e);
             System.exit(1);
         }
 
         /*
-         * Create connection.
-         * Create session from connection; false means session is not transacted.
-         * Create sender and text message.
-         * Send messages, varying text slightly.
-         * Send end-of-messages message.
+         * Create connection. Create session from connection; false means
+         * session is not transacted. Create sender and text message. Send
+         * messages, varying text slightly. Send end-of-messages message.
          * Finally, close connection.
          */
         try {
@@ -122,16 +117,13 @@
              * Send a non-text control message indicating end of messages.
              */
             producer.send(session.createMessage());
-        }
-        catch (JMSException e) {
+        } catch (JMSException e) {
             log.info("Exception occurred: " + e);
-        }
-        finally {
+        } finally {
             if (connection != null) {
                 try {
                     connection.close();
-                }
-                catch (JMSException e) {
+                } catch (JMSException e) {
                 }
             }
         }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueReceiver.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueReceiver.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueReceiver.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueReceiver.java Wed Aug  8 17:34:07 2007
@@ -38,13 +38,12 @@
 import javax.naming.NamingException;
 
 public class SimpleQueueReceiver {
-    
-    private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
-            .getLog(SimpleQueueReceiver.class);
+
+    private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(SimpleQueueReceiver.class);
 
     /**
      * Main method.
-     *
+     * 
      * @param args the queue used by the example
      */
     public static void main(String[] args) {
@@ -61,83 +60,63 @@
          * Read queue name from command line and display it.
          */
         if (args.length != 1) {
-            log.info("Usage: java " +
-                    "SimpleQueueReceiver <queue-name>");
+            log.info("Usage: java " + "SimpleQueueReceiver <queue-name>");
             System.exit(1);
         }
         queueName = args[0];
         log.info("Queue name is " + queueName);
 
         /*
-         * Create a JNDI API InitialContext object if none exists
-         * yet.
+         * Create a JNDI API InitialContext object if none exists yet.
          */
         try {
             jndiContext = new InitialContext();
-        }
-        catch (NamingException e) {
-            log.info("Could not create JNDI API " +
-                    "context: " + e.toString());
+        } catch (NamingException e) {
+            log.info("Could not create JNDI API " + "context: " + e.toString());
             System.exit(1);
         }
 
         /*
-         * Look up connection factory and queue.  If either does
-         * not exist, exit.
+         * Look up connection factory and queue. If either does not exist, exit.
          */
         try {
-            queueConnectionFactory = (QueueConnectionFactory)
-                    jndiContext.lookup("QueueConnectionFactory");
-            queue = (Queue) jndiContext.lookup(queueName);
-        }
-        catch (NamingException e) {
-            log.info("JNDI API lookup failed: " +
-                    e.toString());
+            queueConnectionFactory = (QueueConnectionFactory)jndiContext.lookup("QueueConnectionFactory");
+            queue = (Queue)jndiContext.lookup(queueName);
+        } catch (NamingException e) {
+            log.info("JNDI API lookup failed: " + e.toString());
             System.exit(1);
         }
 
         /*
-         * Create connection.
-         * Create session from connection; false means session is
-         * not transacted.
-         * Create receiver, then start message delivery.
-         * Receive all text messages from queue until
-         * a non-text message is received indicating end of
-         * message stream.
-         * Close connection.
+         * Create connection. Create session from connection; false means
+         * session is not transacted. Create receiver, then start message
+         * delivery. Receive all text messages from queue until a non-text
+         * message is received indicating end of message stream. Close
+         * connection.
          */
         try {
-            queueConnection =
-                    queueConnectionFactory.createQueueConnection();
-            queueSession =
-                    queueConnection.createQueueSession(false,
-                            Session.AUTO_ACKNOWLEDGE);
+            queueConnection = queueConnectionFactory.createQueueConnection();
+            queueSession = queueConnection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
             queueReceiver = queueSession.createReceiver(queue);
             queueConnection.start();
             while (true) {
                 Message m = queueReceiver.receive(1);
                 if (m != null) {
                     if (m instanceof TextMessage) {
-                        message = (TextMessage) m;
-                        log.info("Reading message: " +
-                                message.getText());
-                    }
-                    else {
+                        message = (TextMessage)m;
+                        log.info("Reading message: " + message.getText());
+                    } else {
                         break;
                     }
                 }
             }
-        }
-        catch (JMSException e) {
-            log.info("Exception occurred: " +
-                    e.toString());
-        }
-        finally {
+        } catch (JMSException e) {
+            log.info("Exception occurred: " + e.toString());
+        } finally {
             if (queueConnection != null) {
                 try {
                     queueConnection.close();
-                }
-                catch (JMSException e) {
+                } catch (JMSException e) {
                 }
             }
         }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueSender.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueSender.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueSender.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/demo/SimpleQueueSender.java Wed Aug  8 17:34:07 2007
@@ -28,7 +28,6 @@
 
 // START SNIPPET: demo
 
-
 import javax.jms.JMSException;
 import javax.jms.Queue;
 import javax.jms.QueueConnection;
@@ -42,15 +41,14 @@
 import javax.naming.NamingException;
 
 public class SimpleQueueSender {
-    
-    private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
-            .getLog(SimpleQueueSender.class);
+
+    private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(SimpleQueueSender.class);
 
     /**
      * Main method.
-     *
-     * @param args the queue used by the example and,
-     *             optionally, the number of messages to send
+     * 
+     * @param args the queue used by the example and, optionally, the number of
+     *                messages to send
      */
     public static void main(String[] args) {
         String queueName = null;
@@ -64,51 +62,42 @@
         final int NUM_MSGS;
 
         if ((args.length < 1) || (args.length > 2)) {
-            log.info("Usage: java SimpleQueueSender " +
-                    "<queue-name> [<number-of-messages>]");
+            log.info("Usage: java SimpleQueueSender " + "<queue-name> [<number-of-messages>]");
             System.exit(1);
         }
         queueName = args[0];
         log.info("Queue name is " + queueName);
         if (args.length == 2) {
             NUM_MSGS = (new Integer(args[1])).intValue();
-        }
-        else {
+        } else {
             NUM_MSGS = 1;
         }
 
         /*
-         * Create a JNDI API InitialContext object if none exists
-         * yet.
+         * Create a JNDI API InitialContext object if none exists yet.
          */
         try {
             jndiContext = new InitialContext();
-        }
-        catch (NamingException e) {
+        } catch (NamingException e) {
             log.info("Could not create JNDI API context: " + e.toString());
             System.exit(1);
         }
 
         /*
-         * Look up connection factory and queue.  If either does
-         * not exist, exit.
+         * Look up connection factory and queue. If either does not exist, exit.
          */
         try {
-            queueConnectionFactory = (QueueConnectionFactory) jndiContext.lookup("QueueConnectionFactory");
-            queue = (Queue) jndiContext.lookup(queueName);
-        }
-        catch (NamingException e) {
+            queueConnectionFactory = (QueueConnectionFactory)jndiContext.lookup("QueueConnectionFactory");
+            queue = (Queue)jndiContext.lookup(queueName);
+        } catch (NamingException e) {
             log.info("JNDI API lookup failed: " + e);
             System.exit(1);
         }
 
         /*
-         * Create connection.
-         * Create session from connection; false means session is
-         * not transacted.
-         * Create sender and text message.
-         * Send messages, varying text slightly.
-         * Send end-of-messages message.
+         * Create connection. Create session from connection; false means
+         * session is not transacted. Create sender and text message. Send
+         * messages, varying text slightly. Send end-of-messages message.
          * Finally, close connection.
          */
         try {
@@ -118,27 +107,21 @@
             message = queueSession.createTextMessage();
             for (int i = 0; i < NUM_MSGS; i++) {
                 message.setText("This is message " + (i + 1));
-                log.info("Sending message: " +
-                        message.getText());
+                log.info("Sending message: " + message.getText());
                 queueSender.send(message);
             }
 
             /*
-             * Send a non-text control message indicating end of
-             * messages.
+             * Send a non-text control message indicating end of messages.
              */
             queueSender.send(queueSession.createMessage());
-        }
-        catch (JMSException e) {
-            log.info("Exception occurred: " +
-                    e.toString());
-        }
-        finally {
+        } catch (JMSException e) {
+            log.info("Exception occurred: " + e.toString());
+        } finally {
             if (queueConnection != null) {
                 try {
                     queueConnection.close();
-                }
-                catch (JMSException e) {
+                } catch (JMSException e) {
                 }
             }
         }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/BadDummyPolicyConfigTest.java Wed Aug  8 17:34:07 2007
@@ -16,47 +16,44 @@
  */
 package org.apache.activemq.filter;
 
+import junit.framework.TestCase;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import junit.framework.TestCase;
-
 /**
- *
  * @version $Revision: 1.1 $
  */
 public class BadDummyPolicyConfigTest extends TestCase {
 
     protected static final Log log = LogFactory.getLog(BadDummyPolicyConfigTest.class);
     protected DummyPolicy policy = new DummyPolicy();
-    
+
     public void testNoDestinationSpecified() throws Exception {
         DummyPolicyEntry entry = new DummyPolicyEntry();
         entry.setDescription("cheese");
-        
+
         assertFailsToSetEntries(entry);
     }
-    
+
     public void testNoValueSpecified() throws Exception {
         DummyPolicyEntry entry = new DummyPolicyEntry();
         entry.setTopic("FOO.BAR");
-        
+
         assertFailsToSetEntries(entry);
     }
-    
+
     public void testValidEntry() throws Exception {
         DummyPolicyEntry entry = new DummyPolicyEntry();
         entry.setDescription("cheese");
         entry.setTopic("FOO.BAR");
-        
+
         entry.afterPropertiesSet();
     }
 
     protected void assertFailsToSetEntries(DummyPolicyEntry entry) throws Exception {
         try {
             entry.afterPropertiesSet();
-        }
-        catch (IllegalArgumentException e) {
+        } catch (IllegalArgumentException e) {
             log.info("Worked! Caught expected exception: " + e);
         }
     }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationMapMemoryTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationMapMemoryTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationMapMemoryTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationMapMemoryTest.java Wed Aug  8 17:34:07 2007
@@ -22,7 +22,6 @@
 
 public class DestinationMapMemoryTest extends TestCase {
 
-
     public void testLongDestinationPath() throws Exception {
         ActiveMQTopic d1 = new ActiveMQTopic("1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18");
         DestinationMap map = new DestinationMap();
@@ -36,13 +35,12 @@
             for (int j = 2; j <= i; j++) {
                 name += "." + j;
             }
-            //System.out.println("Checking: " + name);
+            // System.out.println("Checking: " + name);
             try {
                 ActiveMQDestination d1 = createDestination(name);
                 DestinationMap map = new DestinationMap();
                 map.put(d1, d1);
-            }
-            catch (Throwable e) {
+            } catch (Throwable e) {
                 fail("Destination name too long: " + name + " : " + e);
             }
         }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationMapTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationMapTest.java?view=diff&rev=564057&r1=564056&r2=564057
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationMapTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/filter/DestinationMapTest.java Wed Aug  8 17:34:07 2007
@@ -131,7 +131,7 @@
         map.put(d2, v2);
         map.put(d3, v3);
 
-        List allValues = Arrays.asList(new Object[] { v1, v2, v3 });
+        List allValues = Arrays.asList(new Object[] {v1, v2, v3});
 
         assertMapValue(">", allValues);
         assertMapValue("TEST.>", allValues);
@@ -296,21 +296,20 @@
         assertMapValue("TEST.*.*", v3, v5);
         assertMapValue("TEST.BAR.*", v3);
     }
-    
+
     public void testAddAndRemove() throws Exception {
-    	
+
         put("FOO.A", v1);
         assertMapValue("FOO.>", v1);
-        
-        put("FOO.B", v2);        
+
+        put("FOO.B", v2);
         assertMapValue("FOO.>", v1, v2);
-        
+
         Set set = map.removeAll(createDestination("FOO.A"));
-        
+
         assertMapValue("FOO.>", v2);
-        
-    }
 
+    }
 
     protected void loadSample2() {
         put("TEST.FOO", v1);
@@ -353,34 +352,32 @@
     }
 
     protected void assertMapValue(String destinationName, Object expected1, Object expected2) {
-        assertMapValue(destinationName, Arrays.asList(new Object[] { expected1, expected2 }));
+        assertMapValue(destinationName, Arrays.asList(new Object[] {expected1, expected2}));
     }
 
     protected void assertMapValue(String destinationName, Object expected1, Object expected2, Object expected3) {
-        assertMapValue(destinationName, Arrays.asList(new Object[] { expected1, expected2, expected3 }));
+        assertMapValue(destinationName, Arrays.asList(new Object[] {expected1, expected2, expected3}));
     }
 
     protected void assertMapValue(String destinationName, Object expected1, Object expected2, Object expected3, Object expected4) {
-        assertMapValue(destinationName, Arrays.asList(new Object[] { expected1, expected2, expected3, expected4 }));
+        assertMapValue(destinationName, Arrays.asList(new Object[] {expected1, expected2, expected3, expected4}));
     }
 
     protected void assertMapValue(String destinationName, Object expected1, Object expected2, Object expected3, Object expected4, Object expected5) {
-        assertMapValue(destinationName, Arrays.asList(new Object[] { expected1, expected2, expected3, expected4, expected5 }));
+        assertMapValue(destinationName, Arrays.asList(new Object[] {expected1, expected2, expected3, expected4, expected5}));
     }
-    
+
     protected void assertMapValue(String destinationName, Object expected1, Object expected2, Object expected3, Object expected4, Object expected5, Object expected6) {
-        assertMapValue(destinationName, Arrays.asList(new Object[] { expected1, expected2, expected3, expected4, expected5, expected6 }));
+        assertMapValue(destinationName, Arrays.asList(new Object[] {expected1, expected2, expected3, expected4, expected5, expected6}));
     }
 
     protected void assertMapValue(ActiveMQDestination destination, Object expected) {
         List expectedList = null;
         if (expected == null) {
             expectedList = Collections.EMPTY_LIST;
-        }
-        else if (expected instanceof List) {
-            expectedList = (List) expected;
-        }
-        else {
+        } else if (expected instanceof List) {
+            expectedList = (List)expected;
+        } else {
             expectedList = new ArrayList();
             expectedList.add(expected);
         }



Mime
View raw message