You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2007/08/08 20:58:13 UTC

svn commit: r563982 [31/32] - 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/jm...

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/TransactionInfoTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/TransactionInfoTest.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/TransactionInfoTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/TransactionInfoTest.java Wed Aug  8 11:56:59 2007
@@ -16,43 +16,34 @@
  */
 package org.apache.activemq.openwire.v1;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
+import org.apache.activemq.command.TransactionInfo;
 
 /**
  * Test case for the OpenWire marshalling for TransactionInfo
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
+ * 
+ * 
+ * NOTE!: This file is auto generated - do not modify! if you need to make a
+ * change, please see the modify the groovy scripts in the under src/gram/script
+ * and then use maven openwire:generate to regenerate this file.
+ * 
  * @version $Revision$
  */
 public class TransactionInfoTest extends BaseCommandTestSupport {
 
-
     public static TransactionInfoTest SINGLETON = new TransactionInfoTest();
 
     public Object createObject() throws Exception {
-    		TransactionInfo info = new TransactionInfo();
-    		populateObject(info);
-    		return info;
+        TransactionInfo info = new TransactionInfo();
+        populateObject(info);
+        return info;
     }
 
-    
     protected void populateObject(Object object) throws Exception {
-    		super.populateObject(object);
-    		TransactionInfo info = (TransactionInfo) object;
+        super.populateObject(object);
+        TransactionInfo info = (TransactionInfo)object;
         info.setConnectionId(createConnectionId("ConnectionId:1"));
         info.setTransactionId(createTransactionId("TransactionId:2"));
-        info.setType((byte) 1);
+        info.setType((byte)1);
 
-            }
-        }
+    }
+}

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/XATransactionIdTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/XATransactionIdTest.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/XATransactionIdTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v1/XATransactionIdTest.java Wed Aug  8 11:56:59 2007
@@ -16,43 +16,34 @@
  */
 package org.apache.activemq.openwire.v1;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
+import org.apache.activemq.command.XATransactionId;
 
 /**
  * Test case for the OpenWire marshalling for XATransactionId
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
+ * 
+ * 
+ * NOTE!: This file is auto generated - do not modify! if you need to make a
+ * change, please see the modify the groovy scripts in the under src/gram/script
+ * and then use maven openwire:generate to regenerate this file.
+ * 
  * @version $Revision$
  */
 public class XATransactionIdTest extends TransactionIdTestSupport {
 
-
     public static XATransactionIdTest SINGLETON = new XATransactionIdTest();
 
     public Object createObject() throws Exception {
-    		XATransactionId info = new XATransactionId();
-    		populateObject(info);
-    		return info;
+        XATransactionId info = new XATransactionId();
+        populateObject(info);
+        return info;
     }
 
-    
     protected void populateObject(Object object) throws Exception {
-    		super.populateObject(object);
-    		XATransactionId info = (XATransactionId) object;
+        super.populateObject(object);
+        XATransactionId info = (XATransactionId)object;
         info.setFormatId(1);
         info.setGlobalTransactionId("GlobalTransactionId:1".getBytes());
         info.setBranchQualifier("BranchQualifier:2".getBytes());
 
-            }
-        }
+    }
+}

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQBytesMessageTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQBytesMessageTest.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQBytesMessageTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQBytesMessageTest.java Wed Aug  8 11:56:59 2007
@@ -23,33 +23,29 @@
 import org.apache.activemq.openwire.*;
 import org.apache.activemq.command.*;
 
-
 /**
  * Test case for the OpenWire marshalling for ActiveMQBytesMessage
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
+ * 
+ * 
+ * NOTE!: This file is auto generated - do not modify! if you need to make a
+ * change, please see the modify the groovy scripts in the under src/gram/script
+ * and then use maven openwire:generate to regenerate this file.
+ * 
  * @version $Revision: $
  */
 public class ActiveMQBytesMessageTest extends ActiveMQMessageTest {
 
-
     public static ActiveMQBytesMessageTest SINGLETON = new ActiveMQBytesMessageTest();
 
     public Object createObject() throws Exception {
-    		ActiveMQBytesMessage info = new ActiveMQBytesMessage();
-    		populateObject(info);
-    		return info;
+        ActiveMQBytesMessage info = new ActiveMQBytesMessage();
+        populateObject(info);
+        return info;
     }
 
-    
     protected void populateObject(Object object) throws Exception {
-    		super.populateObject(object);
-    		ActiveMQBytesMessage info = (ActiveMQBytesMessage) object;
+        super.populateObject(object);
+        ActiveMQBytesMessage info = (ActiveMQBytesMessage)object;
 
-            }
-        }
+    }
+}

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQDestinationTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQDestinationTestSupport.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQDestinationTestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQDestinationTestSupport.java Wed Aug  8 11:56:59 2007
@@ -23,25 +23,22 @@
 import org.apache.activemq.openwire.*;
 import org.apache.activemq.command.*;
 
-
 /**
  * Test case for the OpenWire marshalling for ActiveMQDestination
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
+ * 
+ * 
+ * NOTE!: This file is auto generated - do not modify! if you need to make a
+ * change, please see the modify the groovy scripts in the under src/gram/script
+ * and then use maven openwire:generate to regenerate this file.
+ * 
  * @version $Revision: $
  */
 public abstract class ActiveMQDestinationTestSupport extends DataFileGeneratorTestSupport {
 
-    
     protected void populateObject(Object object) throws Exception {
-    		super.populateObject(object);
-    		ActiveMQDestination info = (ActiveMQDestination) object;
+        super.populateObject(object);
+        ActiveMQDestination info = (ActiveMQDestination)object;
         info.setPhysicalName("PhysicalName:1");
 
-            }
-        }
+    }
+}

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQMapMessageTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQMapMessageTest.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQMapMessageTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQMapMessageTest.java Wed Aug  8 11:56:59 2007
@@ -23,33 +23,28 @@
 import org.apache.activemq.openwire.*;
 import org.apache.activemq.command.*;
 
-
 /**
  * Test case for the OpenWire marshalling for ActiveMQMapMessage
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
+ * 
+ * 
+ * NOTE!: This file is auto generated - do not modify! if you need to make a
+ * change, please see the modify the groovy scripts in the under src/gram/script
+ * and then use maven openwire:generate to regenerate this file.
+ * 
  * @version $Revision: $
  */
 public class ActiveMQMapMessageTest extends ActiveMQMessageTest {
 
-
     public static ActiveMQMapMessageTest SINGLETON = new ActiveMQMapMessageTest();
 
     public Object createObject() throws Exception {
-    		ActiveMQMapMessage info = new ActiveMQMapMessage();
-    		populateObject(info);
-    		return info;
+        ActiveMQMapMessage info = new ActiveMQMapMessage();
+        populateObject(info);
+        return info;
     }
 
-    
     protected void populateObject(Object object) throws Exception {
-    		super.populateObject(object);
-    		ActiveMQMapMessage info = (ActiveMQMapMessage) object;
-
-            }
-        }
+        super.populateObject(object);
+        ActiveMQMapMessage info = (ActiveMQMapMessage)object;
+    }
+}

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQMessageTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQMessageTest.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQMessageTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQMessageTest.java Wed Aug  8 11:56:59 2007
@@ -23,33 +23,29 @@
 import org.apache.activemq.openwire.*;
 import org.apache.activemq.command.*;
 
-
 /**
  * Test case for the OpenWire marshalling for ActiveMQMessage
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
+ * 
+ * 
+ * NOTE!: This file is auto generated - do not modify! if you need to make a
+ * change, please see the modify the groovy scripts in the under src/gram/script
+ * and then use maven openwire:generate to regenerate this file.
+ * 
  * @version $Revision: $
  */
 public class ActiveMQMessageTest extends MessageTestSupport {
 
-
     public static ActiveMQMessageTest SINGLETON = new ActiveMQMessageTest();
 
     public Object createObject() throws Exception {
-    		ActiveMQMessage info = new ActiveMQMessage();
-    		populateObject(info);
-    		return info;
+        ActiveMQMessage info = new ActiveMQMessage();
+        populateObject(info);
+        return info;
     }
 
-    
     protected void populateObject(Object object) throws Exception {
-    		super.populateObject(object);
-    		ActiveMQMessage info = (ActiveMQMessage) object;
+        super.populateObject(object);
+        ActiveMQMessage info = (ActiveMQMessage)object;
 
-            }
-        }
+    }
+}

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQObjectMessageTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQObjectMessageTest.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQObjectMessageTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQObjectMessageTest.java Wed Aug  8 11:56:59 2007
@@ -23,33 +23,29 @@
 import org.apache.activemq.openwire.*;
 import org.apache.activemq.command.*;
 
-
 /**
  * Test case for the OpenWire marshalling for ActiveMQObjectMessage
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
+ * 
+ * 
+ * NOTE!: This file is auto generated - do not modify! if you need to make a
+ * change, please see the modify the groovy scripts in the under src/gram/script
+ * and then use maven openwire:generate to regenerate this file.
+ * 
  * @version $Revision: $
  */
 public class ActiveMQObjectMessageTest extends ActiveMQMessageTest {
 
-
     public static ActiveMQObjectMessageTest SINGLETON = new ActiveMQObjectMessageTest();
 
     public Object createObject() throws Exception {
-    		ActiveMQObjectMessage info = new ActiveMQObjectMessage();
-    		populateObject(info);
-    		return info;
+        ActiveMQObjectMessage info = new ActiveMQObjectMessage();
+        populateObject(info);
+        return info;
     }
 
-    
     protected void populateObject(Object object) throws Exception {
-    		super.populateObject(object);
-    		ActiveMQObjectMessage info = (ActiveMQObjectMessage) object;
+        super.populateObject(object);
+        ActiveMQObjectMessage info = (ActiveMQObjectMessage)object;
 
-            }
-        }
+    }
+}

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQQueueTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQQueueTest.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQQueueTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQQueueTest.java Wed Aug  8 11:56:59 2007
@@ -23,33 +23,29 @@
 import org.apache.activemq.openwire.*;
 import org.apache.activemq.command.*;
 
-
 /**
  * Test case for the OpenWire marshalling for ActiveMQQueue
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
+ * 
+ * 
+ * NOTE!: This file is auto generated - do not modify! if you need to make a
+ * change, please see the modify the groovy scripts in the under src/gram/script
+ * and then use maven openwire:generate to regenerate this file.
+ * 
  * @version $Revision: $
  */
 public class ActiveMQQueueTest extends ActiveMQDestinationTestSupport {
 
-
     public static ActiveMQQueueTest SINGLETON = new ActiveMQQueueTest();
 
     public Object createObject() throws Exception {
-    		ActiveMQQueue info = new ActiveMQQueue();
-    		populateObject(info);
-    		return info;
+        ActiveMQQueue info = new ActiveMQQueue();
+        populateObject(info);
+        return info;
     }
 
-    
     protected void populateObject(Object object) throws Exception {
-    		super.populateObject(object);
-    		ActiveMQQueue info = (ActiveMQQueue) object;
+        super.populateObject(object);
+        ActiveMQQueue info = (ActiveMQQueue)object;
 
-            }
-        }
+    }
+}

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQStreamMessageTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQStreamMessageTest.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQStreamMessageTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQStreamMessageTest.java Wed Aug  8 11:56:59 2007
@@ -23,33 +23,29 @@
 import org.apache.activemq.openwire.*;
 import org.apache.activemq.command.*;
 
-
 /**
  * Test case for the OpenWire marshalling for ActiveMQStreamMessage
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
+ * 
+ * 
+ * NOTE!: This file is auto generated - do not modify! if you need to make a
+ * change, please see the modify the groovy scripts in the under src/gram/script
+ * and then use maven openwire:generate to regenerate this file.
+ * 
  * @version $Revision: $
  */
 public class ActiveMQStreamMessageTest extends ActiveMQMessageTest {
 
-
     public static ActiveMQStreamMessageTest SINGLETON = new ActiveMQStreamMessageTest();
 
     public Object createObject() throws Exception {
-    		ActiveMQStreamMessage info = new ActiveMQStreamMessage();
-    		populateObject(info);
-    		return info;
+        ActiveMQStreamMessage info = new ActiveMQStreamMessage();
+        populateObject(info);
+        return info;
     }
 
-    
     protected void populateObject(Object object) throws Exception {
-    		super.populateObject(object);
-    		ActiveMQStreamMessage info = (ActiveMQStreamMessage) object;
+        super.populateObject(object);
+        ActiveMQStreamMessage info = (ActiveMQStreamMessage)object;
 
-            }
-        }
+    }
+}

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempDestinationTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempDestinationTestSupport.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempDestinationTestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempDestinationTestSupport.java Wed Aug  8 11:56:59 2007
@@ -16,31 +16,23 @@
  */
 package org.apache.activemq.openwire.v2;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
+import org.apache.activemq.command.ActiveMQTempDestination;
 
 /**
  * Test case for the OpenWire marshalling for ActiveMQTempDestination
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
+ * 
+ * 
+ * NOTE!: This file is auto generated - do not modify! if you need to make a
+ * change, please see the modify the groovy scripts in the under src/gram/script
+ * and then use maven openwire:generate to regenerate this file.
+ * 
  * @version $Revision: $
  */
 public abstract class ActiveMQTempDestinationTestSupport extends ActiveMQDestinationTestSupport {
 
-    
     protected void populateObject(Object object) throws Exception {
-    		super.populateObject(object);
-    		ActiveMQTempDestination info = (ActiveMQTempDestination) object;
+        super.populateObject(object);
+        ActiveMQTempDestination info = (ActiveMQTempDestination)object;
 
-            }
-        }
+    }
+}

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempQueueTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempQueueTest.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempQueueTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempQueueTest.java Wed Aug  8 11:56:59 2007
@@ -16,40 +16,31 @@
  */
 package org.apache.activemq.openwire.v2;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
+import org.apache.activemq.command.ActiveMQTempQueue;
 
 /**
  * Test case for the OpenWire marshalling for ActiveMQTempQueue
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
+ * 
+ * 
+ * NOTE!: This file is auto generated - do not modify! if you need to make a
+ * change, please see the modify the groovy scripts in the under src/gram/script
+ * and then use maven openwire:generate to regenerate this file.
+ * 
  * @version $Revision: $
  */
 public class ActiveMQTempQueueTest extends ActiveMQTempDestinationTestSupport {
 
-
     public static ActiveMQTempQueueTest SINGLETON = new ActiveMQTempQueueTest();
 
     public Object createObject() throws Exception {
-    		ActiveMQTempQueue info = new ActiveMQTempQueue();
-    		populateObject(info);
-    		return info;
+        ActiveMQTempQueue info = new ActiveMQTempQueue();
+        populateObject(info);
+        return info;
     }
 
-    
     protected void populateObject(Object object) throws Exception {
-    		super.populateObject(object);
-    		ActiveMQTempQueue info = (ActiveMQTempQueue) object;
+        super.populateObject(object);
+        ActiveMQTempQueue info = (ActiveMQTempQueue)object;
 
-            }
-        }
+    }
+}

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempTopicTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempTopicTest.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempTopicTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTempTopicTest.java Wed Aug  8 11:56:59 2007
@@ -16,40 +16,31 @@
  */
 package org.apache.activemq.openwire.v2;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
+import org.apache.activemq.command.ActiveMQTempTopic;
 
 /**
  * Test case for the OpenWire marshalling for ActiveMQTempTopic
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
+ * 
+ * 
+ * NOTE!: This file is auto generated - do not modify! if you need to make a
+ * change, please see the modify the groovy scripts in the under src/gram/script
+ * and then use maven openwire:generate to regenerate this file.
+ * 
  * @version $Revision: $
  */
 public class ActiveMQTempTopicTest extends ActiveMQTempDestinationTestSupport {
 
-
     public static ActiveMQTempTopicTest SINGLETON = new ActiveMQTempTopicTest();
 
     public Object createObject() throws Exception {
-    		ActiveMQTempTopic info = new ActiveMQTempTopic();
-    		populateObject(info);
-    		return info;
+        ActiveMQTempTopic info = new ActiveMQTempTopic();
+        populateObject(info);
+        return info;
     }
 
-    
     protected void populateObject(Object object) throws Exception {
-    		super.populateObject(object);
-    		ActiveMQTempTopic info = (ActiveMQTempTopic) object;
+        super.populateObject(object);
+        ActiveMQTempTopic info = (ActiveMQTempTopic)object;
 
-            }
-        }
+    }
+}

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTextMessageTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTextMessageTest.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTextMessageTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTextMessageTest.java Wed Aug  8 11:56:59 2007
@@ -16,40 +16,31 @@
  */
 package org.apache.activemq.openwire.v2;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
+import org.apache.activemq.command.ActiveMQTextMessage;
 
 /**
  * Test case for the OpenWire marshalling for ActiveMQTextMessage
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
+ * 
+ * 
+ * NOTE!: This file is auto generated - do not modify! if you need to make a
+ * change, please see the modify the groovy scripts in the under src/gram/script
+ * and then use maven openwire:generate to regenerate this file.
+ * 
  * @version $Revision: $
  */
 public class ActiveMQTextMessageTest extends ActiveMQMessageTest {
 
-
     public static ActiveMQTextMessageTest SINGLETON = new ActiveMQTextMessageTest();
 
     public Object createObject() throws Exception {
-    		ActiveMQTextMessage info = new ActiveMQTextMessage();
-    		populateObject(info);
-    		return info;
+        ActiveMQTextMessage info = new ActiveMQTextMessage();
+        populateObject(info);
+        return info;
     }
 
-    
     protected void populateObject(Object object) throws Exception {
-    		super.populateObject(object);
-    		ActiveMQTextMessage info = (ActiveMQTextMessage) object;
+        super.populateObject(object);
+        ActiveMQTextMessage info = (ActiveMQTextMessage)object;
 
-            }
-        }
+    }
+}

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTopicTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTopicTest.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTopicTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/ActiveMQTopicTest.java Wed Aug  8 11:56:59 2007
@@ -16,40 +16,31 @@
  */
 package org.apache.activemq.openwire.v2;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
+import org.apache.activemq.command.ActiveMQTopic;
 
 /**
  * Test case for the OpenWire marshalling for ActiveMQTopic
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
+ * 
+ * 
+ * NOTE!: This file is auto generated - do not modify! if you need to make a
+ * change, please see the modify the groovy scripts in the under src/gram/script
+ * and then use maven openwire:generate to regenerate this file.
+ * 
  * @version $Revision: $
  */
 public class ActiveMQTopicTest extends ActiveMQDestinationTestSupport {
 
-
     public static ActiveMQTopicTest SINGLETON = new ActiveMQTopicTest();
 
     public Object createObject() throws Exception {
-    		ActiveMQTopic info = new ActiveMQTopic();
-    		populateObject(info);
-    		return info;
+        ActiveMQTopic info = new ActiveMQTopic();
+        populateObject(info);
+        return info;
     }
 
-    
     protected void populateObject(Object object) throws Exception {
-    		super.populateObject(object);
-    		ActiveMQTopic info = (ActiveMQTopic) object;
+        super.populateObject(object);
+        ActiveMQTopic info = (ActiveMQTopic)object;
 
-            }
-        }
+    }
+}

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/BaseCommandTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/BaseCommandTestSupport.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/BaseCommandTestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v2/BaseCommandTestSupport.java Wed Aug  8 11:56:59 2007
@@ -16,33 +16,24 @@
  */
 package org.apache.activemq.openwire.v2;
 
-import java.io.DataInputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.activemq.openwire.*;
-import org.apache.activemq.command.*;
-
+import org.apache.activemq.command.BaseCommand;
+import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
 
 /**
- * Test case for the OpenWire marshalling for BaseCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate 
- *        this file.
- *
+ * Test case for the OpenWire marshalling for BaseCommand NOTE!: This file is
+ * auto generated - do not modify! if you need to make a change, please see the
+ * modify the groovy scripts in the under src/gram/script and then use maven
+ * openwire:generate to regenerate this file.
+ * 
  * @version $Revision: $
  */
 public abstract class BaseCommandTestSupport extends DataFileGeneratorTestSupport {
 
-    
     protected void populateObject(Object object) throws Exception {
-    		super.populateObject(object);
-    		BaseCommand info = (BaseCommand) object;
+        super.populateObject(object);
+        BaseCommand info = (BaseCommand)object;
         info.setCommandId(1);
         info.setResponseRequired(true);
 
-            }
-        }
+    }
+}

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BaseCommandTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BaseCommandTestSupport.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BaseCommandTestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/openwire/v3/BaseCommandTestSupport.java Wed Aug  8 11:56:59 2007
@@ -16,28 +16,26 @@
  */
 package org.apache.activemq.openwire.v3;
 
-import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
 import org.apache.activemq.command.BaseCommand;
+import org.apache.activemq.openwire.DataFileGeneratorTestSupport;
 
 /**
  * Test case for the OpenWire marshalling for BaseCommand
- *
- *
- * NOTE!: This file is auto generated - do not modify!
- *        if you need to make a change, please see the modify the groovy scripts in the
- *        under src/gram/script and then use maven openwire:generate to regenerate
- *        this file.
- *
+ * 
+ * 
+ * NOTE!: This file is auto generated - do not modify! if you need to make a
+ * change, please see the modify the groovy scripts in the under src/gram/script
+ * and then use maven openwire:generate to regenerate this file.
+ * 
  * @version $Revision: $
  */
 public abstract class BaseCommandTestSupport extends DataFileGeneratorTestSupport {
 
-
     protected void populateObject(Object object) throws Exception {
-    		super.populateObject(object);
-    		BaseCommand info = (BaseCommand) object;
+        super.populateObject(object);
+        BaseCommand info = (BaseCommand)object;
         info.setCommandId(1);
         info.setResponseRequired(true);
 
-            }
-        }
+    }
+}

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/proxy/ProxyConnectorTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/proxy/ProxyConnectorTest.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/proxy/ProxyConnectorTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/proxy/ProxyConnectorTest.java Wed Aug  8 11:56:59 2007
@@ -18,6 +18,7 @@
 
 import javax.jms.DeliveryMode;
 
+import junit.framework.Test;
 import org.apache.activemq.broker.StubConnection;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ConnectionInfo;
@@ -26,15 +27,12 @@
 import org.apache.activemq.command.ProducerInfo;
 import org.apache.activemq.command.SessionInfo;
 
-import junit.framework.Test;
-
-
 public class ProxyConnectorTest extends ProxyTestSupport {
-    
+
     public static Test suite() {
         return suite(ProxyConnectorTest.class);
     }
-    
+
     public static void main(String[] args) {
         junit.textui.TestRunner.run(suite());
     }
@@ -49,39 +47,35 @@
     }
 
     public void initCombosForTestSendAndConsume() {
-        addCombinationValues( "deliveryMode", new Object[]{ 
-        		Integer.valueOf(DeliveryMode.NON_PERSISTENT), 
-        		Integer.valueOf(DeliveryMode.PERSISTENT)
-                } );        
-        addCombinationValues( "destinationType", new Object[]{ 
-                Byte.valueOf(ActiveMQDestination.TOPIC_TYPE), 
-                } );
+        addCombinationValues("deliveryMode", new Object[] {Integer.valueOf(DeliveryMode.NON_PERSISTENT), Integer.valueOf(DeliveryMode.PERSISTENT)});
+        addCombinationValues("destinationType", new Object[] {Byte.valueOf(ActiveMQDestination.TOPIC_TYPE),});
     }
+
     public void testSendAndConsume() throws Exception {
-        
+
         // Start a producer on local broker using the proxy
         StubConnection connection1 = createProxyConnection();
         ConnectionInfo connectionInfo1 = createConnectionInfo();
-        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);        
+        SessionInfo sessionInfo1 = createSessionInfo(connectionInfo1);
         ProducerInfo producerInfo = createProducerInfo(sessionInfo1);
         connection1.send(connectionInfo1);
         connection1.send(sessionInfo1);
         connection1.send(producerInfo);
 
         destination = createDestinationInfo(connection1, connectionInfo1, destinationType);
-        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);        
+        ConsumerInfo consumerInfo1 = createConsumerInfo(sessionInfo1, destination);
         connection1.send(consumerInfo1);
 
         // Start a consumer on a remote broker using a proxy connection.
         StubConnection connection2 = createRemoteProxyConnection();
         ConnectionInfo connectionInfo2 = createConnectionInfo();
-        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);        
+        SessionInfo sessionInfo2 = createSessionInfo(connectionInfo2);
         connection2.send(connectionInfo2);
         connection2.send(sessionInfo2);
 
-        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination);        
+        ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination);
         connection2.send(consumerInfo2);
-        
+
         // Give broker enough time to receive and register the consumer info
         // Either that or make consumer retroactive
         try {
@@ -92,8 +86,9 @@
 
         // Send the message to the local broker.
         connection1.request(createMessage(producerInfo, destination, deliveryMode));
-                
-        // Verify that the message Was sent to the remote broker and the local broker.
+
+        // Verify that the message Was sent to the remote broker and the local
+        // broker.
         Message m;
         m = receiveMessage(connection1);
         assertNotNull(m);
@@ -105,5 +100,4 @@
 
     }
 
-   
 }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/AuthorizationMapTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/AuthorizationMapTest.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/AuthorizationMapTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/AuthorizationMapTest.java Wed Aug  8 11:56:59 2007
@@ -16,13 +16,13 @@
  */
 package org.apache.activemq.security;
 
-import org.apache.activemq.command.ActiveMQQueue;
-import org.apache.activemq.command.ActiveMQTempQueue;
-import org.apache.activemq.jaas.GroupPrincipal;
-
-import java.util.*;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Set;
 
 import junit.framework.TestCase;
+import org.apache.activemq.command.ActiveMQQueue;
+import org.apache.activemq.jaas.GroupPrincipal;
 
 /**
  * 
@@ -41,7 +41,7 @@
         assertEquals("set size: " + readACLs, 2, readACLs.size());
         assertTrue("Contains users group", readACLs.contains(admins));
         assertTrue("Contains users group", readACLs.contains(users));
-        
+
     }
 
     public void testAuthorizationMapWithTempDest() {
@@ -51,13 +51,13 @@
         assertEquals("set size: " + readACLs, 2, readACLs.size());
         assertTrue("Contains users group", readACLs.contains(admins));
         assertTrue("Contains users group", readACLs.contains(users));
-        
+
         Set tempAdminACLs = map.getTempDestinationAdminACLs();
         assertEquals("set size: " + tempAdminACLs, 1, tempAdminACLs.size());
         assertTrue("Contains users group", tempAdminACLs.contains(tempDestinationAdmins));
-              
-    }    
-    
+
+    }
+
     protected AuthorizationMap createAuthorizationMap() {
         DefaultAuthorizationMap answer = new DefaultAuthorizationMap();
 
@@ -67,20 +67,19 @@
         entry.setGroupClass("org.apache.activemq.jaas.GroupPrincipal");
         entry.setQueue(">");
         try {
-        	entry.setRead("admins");
+            entry.setRead("admins");
         } catch (Exception e) {
-        	fail(e.toString());
+            fail(e.toString());
         }
-        
-        
+
         entries.add(entry);
-        // entry using default org.apache.activemq.jaas.GroupPrincipal class  
+        // entry using default org.apache.activemq.jaas.GroupPrincipal class
         entry = new AuthorizationEntry();
         entry.setQueue("USERS.>");
         try {
-        	entry.setRead("users");
+            entry.setRead("users");
         } catch (Exception e) {
-        	fail(e.toString());
+            fail(e.toString());
         }
         entries.add(entry);
 
@@ -88,7 +87,7 @@
 
         return answer;
     }
-    
+
     protected AuthorizationMap createAuthorizationMapWithTempDest() {
         DefaultAuthorizationMap answer = new DefaultAuthorizationMap();
 
@@ -97,34 +96,34 @@
         AuthorizationEntry entry = new AuthorizationEntry();
         entry.setQueue(">");
         try {
-        	entry.setRead("admins");
+            entry.setRead("admins");
         } catch (Exception e) {
-        	fail(e.toString());
+            fail(e.toString());
         }
         entries.add(entry);
 
         entry = new AuthorizationEntry();
         entry.setQueue("USERS.>");
         try {
-        	entry.setRead("users");
+            entry.setRead("users");
         } catch (Exception e) {
-        	fail(e.toString());
+            fail(e.toString());
         }
         entries.add(entry);
 
         answer.setAuthorizationEntries(entries);
-        
-        //create entry for temporary queue
+
+        // create entry for temporary queue
         TempDestinationAuthorizationEntry tEntry = new TempDestinationAuthorizationEntry();
         try {
-        	tEntry.setAdmin("tempDestAdmins");
+            tEntry.setAdmin("tempDestAdmins");
         } catch (Exception e) {
-        	fail(e.toString());
-        }        
-        
+            fail(e.toString());
+        }
+
         answer.setTempDestinationAuthorizationEntry(tEntry);
 
         return answer;
-    }    
+    }
 
 }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityTestSupport.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityTestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/security/SecurityTestSupport.java Wed Aug  8 11:56:59 2007
@@ -16,6 +16,13 @@
  */
 package org.apache.activemq.security;
 
+import javax.jms.Connection;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.jms.MessageConsumer;
+import javax.jms.Session;
+import javax.jms.TextMessage;
+
 import org.apache.activemq.CombinationTestSupport;
 import org.apache.activemq.JmsTestSupport;
 import org.apache.activemq.broker.BrokerService;
@@ -24,13 +31,6 @@
 import org.apache.activemq.command.ActiveMQQueue;
 import org.apache.activemq.command.ActiveMQTopic;
 
-import javax.jms.Connection;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.jms.MessageConsumer;
-import javax.jms.Session;
-import javax.jms.TextMessage;
-
 /**
  * 
  * @version $Revision$
@@ -59,8 +59,7 @@
             connections.add(c);
             c.start();
             fail("Expected exception.");
-        }
-        catch (JMSException e) {
+        } catch (JMSException e) {
         }
 
         try {
@@ -69,8 +68,7 @@
             connections.add(c);
             c.start();
             fail("Expected exception.");
-        }
-        catch (JMSException e) {
+        } catch (JMSException e) {
         }
 
         try {
@@ -79,8 +77,7 @@
             connections.add(c);
             c.start();
             fail("Expected exception.");
-        }
-        catch (JMSException e) {
+        } catch (JMSException e) {
         }
     }
 
@@ -131,8 +128,7 @@
         Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
         try {
             sendMessages(session, destination, 1);
-        }
-        catch (JMSException e) {
+        } catch (JMSException e) {
             // If test is expected to fail, the cause must only be a
             // SecurityException
             // otherwise rethrow the exception
@@ -146,7 +142,7 @@
             assertNull(m);
         else {
             assertNotNull(m);
-            assertEquals("0", ((TextMessage) m).getText());
+            assertEquals("0", ((TextMessage)m).getText());
             assertNull(consumer.receiveNoWait());
         }
         return m;
@@ -164,8 +160,7 @@
             consumer = session.createConsumer(destination);
             if (fail)
                 fail("Expected failure due to security constraint.");
-        }
-        catch (JMSException e) {
+        } catch (JMSException e) {
             if (fail && e.getCause() instanceof SecurityException)
                 return null;
             throw e;
@@ -178,7 +173,7 @@
 
         Message m = consumer.receive(1000);
         assertNotNull(m);
-        assertEquals("0", ((TextMessage) m).getText());
+        assertEquals("0", ((TextMessage)m).getText());
         assertNull(consumer.receiveNoWait());
         return m;
 
@@ -188,83 +183,95 @@
      * @see {@link CombinationTestSupport}
      */
     public void initCombosForTestUserReceiveFails() {
-        addCombinationValues("userName", new Object[] { "user" });
-        addCombinationValues("password", new Object[] { "password" });
-        addCombinationValues("destination", new Object[] { new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST"), new ActiveMQQueue("GUEST.BAR"),
-                new ActiveMQTopic("GUEST.BAR"), });
+        addCombinationValues("userName", new Object[] {"user"});
+        addCombinationValues("password", new Object[] {"password"});
+        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"),
+                                                          new ActiveMQTopic("TEST"),
+                                                          new ActiveMQQueue("GUEST.BAR"),
+                                                          new ActiveMQTopic("GUEST.BAR"),});
     }
 
     /**
      * @see {@link CombinationTestSupport}
      */
     public void initCombosForTestInvalidAuthentication() {
-        addCombinationValues("userName", new Object[] { "user" });
-        addCombinationValues("password", new Object[] { "password" });
+        addCombinationValues("userName", new Object[] {"user"});
+        addCombinationValues("password", new Object[] {"password"});
     }
 
     /**
      * @see {@link CombinationTestSupport}
      */
     public void initCombosForTestUserReceiveSucceeds() {
-        addCombinationValues("userName", new Object[] { "user" });
-        addCombinationValues("password", new Object[] { "password" });
-        addCombinationValues("destination", new Object[] { new ActiveMQQueue("USERS.FOO"), new ActiveMQTopic("USERS.FOO"), });
+        addCombinationValues("userName", new Object[] {"user"});
+        addCombinationValues("password", new Object[] {"password"});
+        addCombinationValues("destination", new Object[] {new ActiveMQQueue("USERS.FOO"),
+                                                          new ActiveMQTopic("USERS.FOO"),});
     }
 
     /**
      * @see {@link CombinationTestSupport}
      */
     public void initCombosForTestGuestReceiveSucceeds() {
-        addCombinationValues("userName", new Object[] { "guest" });
-        addCombinationValues("password", new Object[] { "password" });
-        addCombinationValues("destination", new Object[] { new ActiveMQQueue("GUEST.BAR"), new ActiveMQTopic("GUEST.BAR"), });
+        addCombinationValues("userName", new Object[] {"guest"});
+        addCombinationValues("password", new Object[] {"password"});
+        addCombinationValues("destination", new Object[] {new ActiveMQQueue("GUEST.BAR"),
+                                                          new ActiveMQTopic("GUEST.BAR"),});
     }
 
     /**
      * @see {@link CombinationTestSupport}
      */
     public void initCombosForTestGuestReceiveFails() {
-        addCombinationValues("userName", new Object[] { "guest" });
-        addCombinationValues("password", new Object[] { "password" });
-        addCombinationValues("destination", new Object[] { new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST"), new ActiveMQQueue("USERS.FOO"),
-                new ActiveMQTopic("USERS.FOO"), });
+        addCombinationValues("userName", new Object[] {"guest"});
+        addCombinationValues("password", new Object[] {"password"});
+        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"),
+                                                          new ActiveMQTopic("TEST"),
+                                                          new ActiveMQQueue("USERS.FOO"),
+                                                          new ActiveMQTopic("USERS.FOO"),});
     }
 
     /**
      * @see {@link CombinationTestSupport}
      */
     public void initCombosForTestUserSendSucceeds() {
-        addCombinationValues("userName", new Object[] { "user" });
-        addCombinationValues("password", new Object[] { "password" });
-        addCombinationValues("destination", new Object[] { new ActiveMQQueue("USERS.FOO"), new ActiveMQQueue("GUEST.BAR"), new ActiveMQTopic("USERS.FOO"),
-                new ActiveMQTopic("GUEST.BAR"), });
+        addCombinationValues("userName", new Object[] {"user"});
+        addCombinationValues("password", new Object[] {"password"});
+        addCombinationValues("destination", new Object[] {new ActiveMQQueue("USERS.FOO"),
+                                                          new ActiveMQQueue("GUEST.BAR"),
+                                                          new ActiveMQTopic("USERS.FOO"),
+                                                          new ActiveMQTopic("GUEST.BAR"),});
     }
 
     /**
      * @see {@link CombinationTestSupport}
      */
     public void initCombosForTestUserSendFails() {
-        addCombinationValues("userName", new Object[] { "user" });
-        addCombinationValues("password", new Object[] { "password" });
-        addCombinationValues("destination", new Object[] { new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST"), });
+        addCombinationValues("userName", new Object[] {"user"});
+        addCombinationValues("password", new Object[] {"password"});
+        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"),
+                                                          new ActiveMQTopic("TEST"),});
     }
 
     /**
      * @see {@link CombinationTestSupport}
      */
     public void initCombosForTestGuestSendFails() {
-        addCombinationValues("userName", new Object[] { "guest" });
-        addCombinationValues("password", new Object[] { "password" });
-        addCombinationValues("destination", new Object[] { new ActiveMQQueue("TEST"), new ActiveMQTopic("TEST"), new ActiveMQQueue("USERS.FOO"),
-                new ActiveMQTopic("USERS.FOO"), });
+        addCombinationValues("userName", new Object[] {"guest"});
+        addCombinationValues("password", new Object[] {"password"});
+        addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"),
+                                                          new ActiveMQTopic("TEST"),
+                                                          new ActiveMQQueue("USERS.FOO"),
+                                                          new ActiveMQTopic("USERS.FOO")});
     }
 
     /**
      * @see {@link CombinationTestSupport}
      */
     public void initCombosForTestGuestSendSucceeds() {
-        addCombinationValues("userName", new Object[] { "guest" });
-        addCombinationValues("password", new Object[] { "password" });
-        addCombinationValues("destination", new Object[] { new ActiveMQQueue("GUEST.BAR"), new ActiveMQTopic("GUEST.BAR"), });
+        addCombinationValues("userName", new Object[] {"guest"});
+        addCombinationValues("password", new Object[] {"password"});
+        addCombinationValues("destination", new Object[] {new ActiveMQQueue("GUEST.BAR"),
+                                                          new ActiveMQTopic("GUEST.BAR"),});
     }
 }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/QueueClusterTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/QueueClusterTest.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/QueueClusterTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/QueueClusterTest.java Wed Aug  8 11:56:59 2007
@@ -16,21 +16,18 @@
  */
 package org.apache.activemq.transport;
 
-
-
 /**
  * @version $Revision$
  */
 public class QueueClusterTest extends TopicClusterTest {
-    
-    
-    protected void setUp() throws Exception{
-       topic = false;
-       super.setUp();
+
+    protected void setUp() throws Exception {
+        topic = false;
+        super.setUp();
     }
-    
-    protected int expectedReceiveCount(){
+
+    protected int expectedReceiveCount() {
         return MESSAGE_COUNT * NUMBER_IN_CLUSTER;
     }
-    
+
 }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubTransport.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubTransport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/StubTransport.java Wed Aug  8 11:56:59 2007
@@ -16,21 +16,20 @@
  */
 package org.apache.activemq.transport;
 
+import java.io.IOException;
 import java.util.Queue;
 import java.util.concurrent.ConcurrentLinkedQueue;
 
 import org.apache.activemq.util.ServiceStopper;
 
-import java.io.IOException;
-
 /**
- *
+ * 
  * @version $Revision$
  */
 public class StubTransport extends TransportSupport {
 
     private Queue queue = new ConcurrentLinkedQueue();
-    
+
     protected void doStop(ServiceStopper stopper) throws Exception {
     }
 
@@ -45,9 +44,8 @@
         return queue;
     }
 
-	public String getRemoteAddress() {
-		return null;
-	}
+    public String getRemoteAddress() {
+        return null;
+    }
 
-    
 }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerTest.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/failover/FailoverConsumerTest.java Wed Aug  8 11:56:59 2007
@@ -30,85 +30,88 @@
 import org.apache.activemq.network.NetworkTestSupport;
 
 public class FailoverConsumerTest extends NetworkTestSupport {
-    
+
     private static final org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory
-            .getLog(FailoverConsumerTest.class);
-    
+        .getLog(FailoverConsumerTest.class);
+
     public static final int MSG_COUNT = 100;
-    
+
     public void testPublisherFailsOver() throws Exception {
-    	// Uncomment this if you want to use remote broker created by NetworkTestSupport.
-    	// But it doesn't work. See comments below.
-//        URI failoverURI = new URI("failover://"+remoteConnector.getServer().getConnectURI());
+        // Uncomment this if you want to use remote broker created by
+        // NetworkTestSupport.
+        // But it doesn't work. See comments below.
+        // URI failoverURI = new
+        // URI("failover://"+remoteConnector.getServer().getConnectURI());
         URI failoverURI = new URI("failover://tcp://localhost:61616");
 
-		ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(failoverURI);
-		ActiveMQPrefetchPolicy prefetchPolicy = new ActiveMQPrefetchPolicy();
-		
-		// Prefetch size must be less than messages in the queue!!
-		prefetchPolicy.setQueuePrefetch(MSG_COUNT - 10);
-		factory.setPrefetchPolicy(prefetchPolicy);
-		Connection connection = factory.createConnection();
-		Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
-		MessageProducer producer = session.createProducer(new ActiveMQQueue("Test"));
-		for (int idx = 0; idx < MSG_COUNT; ++idx) {
-			producer.send(session.createTextMessage("Test"));
-		}
-		producer.close();
-		session.close();
-		int count = 0;
-
-		Session consumerSession = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-		MessageConsumer consumer = consumerSession.createConsumer(new ActiveMQQueue("Test"));
-		connection.start();
-		Message msg = consumer.receive(3000);
-		
-		// restartRemoteBroker() doesn't work (you won't get received any messages
-		// after restart, javadoc says, that messages should be received though).
-		// So we must use external broker ant restart it manually.
-		log.info("You should restart remote broker now and press enter!");
-		System.in.read();
-//		Thread.sleep(20000);
-		restartRemoteBroker();
-		msg.acknowledge();
-		++count;
-		
-		for (int idx = 1; idx < MSG_COUNT; ++idx) {
-			msg = consumer.receive(3000);
-			if (msg == null) {
-				log.error("No messages received! Received:" + count);
-				break;
-			}
-			msg.acknowledge();
-			++count;
-		}
-		assertEquals(count, MSG_COUNT);
-		consumer.close();
-		consumerSession.close();
-		connection.close();
-		
-		connection = factory.createConnection();
-		consumerSession = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
-		consumer = consumerSession.createConsumer(new ActiveMQQueue("Test"));
-		connection.start();
-
-		count = 0;
-		do {
-			msg = consumer.receive(1000);
-			if (msg != null) {
-				msg.acknowledge();
-				++count;
-			}
-		}
-		while (msg != null);
-		
-		assertEquals(count, 0);
-		
-		consumer.close();
-		consumerSession.close();
-		connection.close();
+        ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(failoverURI);
+        ActiveMQPrefetchPolicy prefetchPolicy = new ActiveMQPrefetchPolicy();
+
+        // Prefetch size must be less than messages in the queue!!
+        prefetchPolicy.setQueuePrefetch(MSG_COUNT - 10);
+        factory.setPrefetchPolicy(prefetchPolicy);
+        Connection connection = factory.createConnection();
+        Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
+        MessageProducer producer = session.createProducer(new ActiveMQQueue("Test"));
+        for (int idx = 0; idx < MSG_COUNT; ++idx) {
+            producer.send(session.createTextMessage("Test"));
+        }
+        producer.close();
+        session.close();
+        int count = 0;
+
+        Session consumerSession = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
+        MessageConsumer consumer = consumerSession.createConsumer(new ActiveMQQueue("Test"));
+        connection.start();
+        Message msg = consumer.receive(3000);
+
+        // restartRemoteBroker() doesn't work (you won't get received any
+        // messages
+        // after restart, javadoc says, that messages should be received
+        // though).
+        // So we must use external broker ant restart it manually.
+        log.info("You should restart remote broker now and press enter!");
+        System.in.read();
+        // Thread.sleep(20000);
+        restartRemoteBroker();
+        msg.acknowledge();
+        ++count;
+
+        for (int idx = 1; idx < MSG_COUNT; ++idx) {
+            msg = consumer.receive(3000);
+            if (msg == null) {
+                log.error("No messages received! Received:" + count);
+                break;
+            }
+            msg.acknowledge();
+            ++count;
+        }
+        assertEquals(count, MSG_COUNT);
+        consumer.close();
+        consumerSession.close();
+        connection.close();
+
+        connection = factory.createConnection();
+        consumerSession = connection.createSession(false, Session.CLIENT_ACKNOWLEDGE);
+        consumer = consumerSession.createConsumer(new ActiveMQQueue("Test"));
+        connection.start();
+
+        count = 0;
+        do {
+            msg = consumer.receive(1000);
+            if (msg != null) {
+                msg.acknowledge();
+                ++count;
+            }
+        } while (msg != null);
+
+        assertEquals(count, 0);
+
+        consumer.close();
+        consumerSession.close();
+        connection.close();
     }
-    
+
     protected String getRemoteURI() {
         return "tcp://localhost:55555";
     }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/ReliableTransportTest.java Wed Aug  8 11:56:59 2007
@@ -16,18 +16,16 @@
  */
 package org.apache.activemq.transport.reliable;
 
-import junit.framework.TestCase;
+import java.util.Queue;
 
+import junit.framework.TestCase;
 import org.apache.activemq.command.ConsumerInfo;
 import org.apache.activemq.transport.StubTransport;
 import org.apache.activemq.transport.StubTransportListener;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import java.util.Queue;
-
 /**
- * 
  * @version $Revision$
  */
 public class ReliableTransportTest extends TestCase {
@@ -39,53 +37,53 @@
     protected ReplayStrategy replayStrategy;
 
     public void testValidSequenceOfPackets() throws Exception {
-        int[] sequenceNumbers = { 1, 2, 3, 4, 5, 6, 7 };
-        
+        int[] sequenceNumbers = {1, 2, 3, 4, 5, 6, 7};
+
         sendStreamOfCommands(sequenceNumbers, true);
     }
-    
+
     public void testValidWrapAroundPackets() throws Exception {
         int[] sequenceNumbers = new int[10];
-        
+
         int value = Integer.MAX_VALUE - 3;
         transport.setExpectedCounter(value);
-        
+
         for (int i = 0; i < 10; i++) {
             log.info("command: " + i + " = " + value);
             sequenceNumbers[i] = value++;
         }
-        
+
         sendStreamOfCommands(sequenceNumbers, true);
     }
-    
+
     public void testDuplicatePacketsDropped() throws Exception {
-        int[] sequenceNumbers = { 1, 2, 2, 3, 4, 5, 6, 7 };
-        
+        int[] sequenceNumbers = {1, 2, 2, 3, 4, 5, 6, 7};
+
         sendStreamOfCommands(sequenceNumbers, true, 7);
     }
-    
+
     public void testOldDuplicatePacketsDropped() throws Exception {
-        int[] sequenceNumbers = { 1, 2, 3, 4, 5, 2, 6, 7 };
-        
+        int[] sequenceNumbers = {1, 2, 3, 4, 5, 2, 6, 7};
+
         sendStreamOfCommands(sequenceNumbers, true, 7);
     }
-    
+
     public void testOldDuplicatePacketsDroppedUsingNegativeCounters() throws Exception {
-        int[] sequenceNumbers = { -3, -1, -3, -2, -1, 0, 1, -1, 3, 2, 0, 2, 4 };
-        
+        int[] sequenceNumbers = {-3, -1, -3, -2, -1, 0, 1, -1, 3, 2, 0, 2, 4};
+
         transport.setExpectedCounter(-3);
-        
+
         sendStreamOfCommands(sequenceNumbers, true, 8);
     }
-    
+
     public void testWrongOrderOfPackets() throws Exception {
-        int[] sequenceNumbers = { 4, 3, 1, 5, 2, 7, 6, 8, 10, 9 };
+        int[] sequenceNumbers = {4, 3, 1, 5, 2, 7, 6, 8, 10, 9};
 
         sendStreamOfCommands(sequenceNumbers, true);
     }
 
     public void testMissingPacketsFails() throws Exception {
-        int[] sequenceNumbers = { 1, 2, /* 3, */  4, 5, 6, 7, 8, 9, 10 };
+        int[] sequenceNumbers = {1, 2, /* 3, */4, 5, 6, 7, 8, 9, 10};
 
         sendStreamOfCommands(sequenceNumbers, false);
     }
@@ -93,33 +91,32 @@
     protected void sendStreamOfCommands(int[] sequenceNumbers, boolean expected) {
         sendStreamOfCommands(sequenceNumbers, expected, sequenceNumbers.length);
     }
-    
+
     protected void sendStreamOfCommands(int[] sequenceNumbers, boolean expected, int expectedCount) {
         for (int i = 0; i < sequenceNumbers.length; i++) {
             int commandId = sequenceNumbers[i];
-            
+
             ConsumerInfo info = new ConsumerInfo();
             info.setSelector("Cheese: " + commandId);
             info.setCommandId(commandId);
 
             transport.onCommand(info);
         }
-        
+
         Queue exceptions = listener.getExceptions();
         Queue commands = listener.getCommands();
         if (expected) {
             if (!exceptions.isEmpty()) {
-                Exception e = (Exception) exceptions.remove();
+                Exception e = (Exception)exceptions.remove();
                 e.printStackTrace();
                 fail("Caught exception: " + e);
             }
             assertEquals("number of messages received", expectedCount, commands.size());
-            
+
             assertEquals("Should have no buffered commands", 0, transport.getBufferedCommandCount());
-                   }
-        else {
+        } else {
             assertTrue("Should have received an exception!", exceptions.size() > 0);
-            Exception e = (Exception) exceptions.remove();
+            Exception e = (Exception)exceptions.remove();
             log.info("Caught expected response: " + e);
         }
     }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramSocket.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramSocket.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramSocket.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/reliable/UnreliableCommandDatagramSocket.java Wed Aug  8 11:56:59 2007
@@ -16,6 +16,10 @@
  */
 package org.apache.activemq.transport.reliable;
 
+import java.io.IOException;
+import java.net.DatagramSocket;
+import java.net.SocketAddress;
+
 import org.apache.activemq.openwire.OpenWireFormat;
 import org.apache.activemq.transport.udp.CommandDatagramSocket;
 import org.apache.activemq.transport.udp.DatagramHeaderMarshaller;
@@ -23,12 +27,7 @@
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
-import java.io.IOException;
-import java.net.DatagramSocket;
-import java.net.SocketAddress;
-
 /**
- * 
  * @version $Revision: $
  */
 public class UnreliableCommandDatagramSocket extends CommandDatagramSocket {
@@ -36,15 +35,13 @@
 
     private DropCommandStrategy dropCommandStrategy;
 
-    public UnreliableCommandDatagramSocket(UdpTransport transport, OpenWireFormat wireFormat, int datagramSize,
-            SocketAddress targetAddress, DatagramHeaderMarshaller headerMarshaller, DatagramSocket channel,
-            DropCommandStrategy strategy) {
+    public UnreliableCommandDatagramSocket(UdpTransport transport, OpenWireFormat wireFormat, int datagramSize, SocketAddress targetAddress,
+                                           DatagramHeaderMarshaller headerMarshaller, DatagramSocket channel, DropCommandStrategy strategy) {
         super(transport, wireFormat, datagramSize, targetAddress, headerMarshaller, channel);
         this.dropCommandStrategy = strategy;
     }
 
-    protected void sendWriteBuffer(int commandId, SocketAddress address, byte[] data, boolean redelivery)
-            throws IOException {
+    protected void sendWriteBuffer(int commandId, SocketAddress address, byte[] data, boolean redelivery) throws IOException {
         if (dropCommandStrategy.shouldDropCommand(commandId, address, redelivery)) {
             log.info("Dropping datagram with command: " + commandId);
 
@@ -53,8 +50,7 @@
             if (bufferCache != null && !redelivery) {
                 bufferCache.addBuffer(commandId, data);
             }
-        }
-        else {
+        } else {
             super.sendWriteBuffer(commandId, address, data, redelivery);
         }
     }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompConnection.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompConnection.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompConnection.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompConnection.java Wed Aug  8 11:56:59 2007
@@ -24,11 +24,10 @@
 import java.net.Socket;
 import java.net.UnknownHostException;
 
-
 public class StompConnection {
 
     public static final long RECEIVE_TIMEOUT = 10000;
-    
+
     private Socket stompSocket;
     private ByteArrayOutputStream inputBuffer = new ByteArrayOutputStream();
 
@@ -36,13 +35,13 @@
         stompSocket = new Socket(host, port);
     }
 
-	public void close() throws IOException {
-		if (stompSocket != null) {
-		    stompSocket.close();
-	        stompSocket = null;
-		}
-	}
-	
+    public void close() throws IOException {
+        if (stompSocket != null) {
+            stompSocket.close();
+            stompSocket = null;
+        }
+    }
+
     public void sendFrame(String data) throws Exception {
         byte[] bytes = data.getBytes("UTF-8");
         OutputStream outputStream = stompSocket.getOutputStream();
@@ -52,28 +51,26 @@
     }
 
     public String receiveFrame() throws Exception {
-    	return receiveFrame(RECEIVE_TIMEOUT);
+        return receiveFrame(RECEIVE_TIMEOUT);
     }
 
     private 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();
                 if (c != '\n') {
-                	throw new IOException("Expecting stomp frame to terminate with \0\n");
+                    throw new IOException("Expecting stomp frame to terminate with \0\n");
                 }
                 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/transport/stomp/StompSubscriptionRemoveTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSubscriptionRemoveTest.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSubscriptionRemoveTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/stomp/StompSubscriptionRemoveTest.java Wed Aug  8 11:56:59 2007
@@ -27,7 +27,6 @@
 import javax.jms.Session;
 
 import junit.framework.TestCase;
-
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.command.ActiveMQQueue;
@@ -35,7 +34,7 @@
 import org.apache.commons.logging.LogFactory;
 
 /**
- *
+ * 
  * @version $Revision$
  */
 public class StompSubscriptionRemoveTest extends TestCase {
@@ -45,7 +44,7 @@
     private static final int STOMP_PORT = 61613;
 
     private StompConnection stompConnection = new StompConnection();
-    
+
     public void testRemoveSubscriber() throws Exception {
         BrokerService broker = new BrokerService();
         broker.setPersistent(false);
@@ -75,7 +74,7 @@
         stompConnection.receiveFrame();
         String frame = "SUBSCRIBE\n" + "destination:/queue/" + getDestinationName() + "\n" + "ack:client\n\n";
         stompConnection.sendFrame(frame);
-        
+
         int messagesCount = 0;
         int count = 0;
         while (count < 2) {
@@ -111,12 +110,11 @@
                 String messageId = getHeaderValue(receiveFrame, HEADER_MESSAGE_ID);
                 String ackmessage = "ACK\n" + HEADER_MESSAGE_ID + ":" + messageId.trim() + "\n\n";
                 stompConnection.sendFrame(ackmessage);
-                //Thread.sleep(1000);
+                // Thread.sleep(1000);
                 ++messagesCount;
                 ++count;
             }
-        }
-        catch (IOException ex) {
+        } catch (IOException ex) {
             ex.printStackTrace();
         }
 
@@ -127,7 +125,8 @@
         log.info("Total messages received: " + messagesCount);
         assertTrue("Messages received after connection loss: " + messagesCount, messagesCount >= 2000);
 
-        // The first ack messages has no chance complete, so we receiving more messages
+        // The first ack messages has no chance complete, so we receiving more
+        // messages
 
         // Don't know how to list subscriptions for the broker. Currently you
         // can check using JMX console. You'll see
@@ -140,28 +139,28 @@
 
     // These two methods could move to a utility class
     protected String getCommand(String frame) {
-    	return frame.substring(0, frame.indexOf('\n') + 1).trim();
+        return frame.substring(0, frame.indexOf('\n') + 1).trim();
     }
 
-    protected String getHeaderValue (String frame, String header) throws IOException {
+    protected String getHeaderValue(String frame, String header) throws IOException {
         DataInput input = new DataInputStream(new ByteArrayInputStream(frame.getBytes()));
         String line;
-        for (int idx = 0; /*forever, sort of*/; ++idx) {
+        for (int idx = 0; /* forever, sort of */; ++idx) {
             line = input.readLine();
             if (line == null) {
-            	// end of message, no headers
-            	return null;
-            } 
+                // end of message, no headers
+                return null;
+            }
             line = line.trim();
             if (line.length() == 0) {
-            	// start body, no headers from here on
-            	return null;
-            } 
-            if (idx > 0) {     // Ignore command line
-            	int pos = line.indexOf(':');
-            	if (header.equals(line.substring(0, pos))) {
-            		return line.substring(pos + 1).trim();
-            	}
+                // start body, no headers from here on
+                return null;
+            }
+            if (idx > 0) { // Ignore command line
+                int pos = line.indexOf(':');
+                if (header.equals(line.substring(0, pos))) {
+                    return line.substring(pos + 1).trim();
+                }
             }
         }
     }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportFactoryTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportFactoryTest.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportFactoryTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/SslTransportFactoryTest.java Wed Aug  8 11:56:59 2007
@@ -17,16 +17,16 @@
 
 package org.apache.activemq.transport.tcp;
 
-import junit.framework.TestCase;
-import org.apache.activemq.openwire.OpenWireFormat;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 import java.io.IOException;
 import java.net.URI;
 import java.util.HashMap;
 import java.util.Map;
 
+import junit.framework.TestCase;
+import org.apache.activemq.openwire.OpenWireFormat;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
 public class SslTransportFactoryTest extends TestCase {
     private static final transient Log log = LogFactory.getLog(SslTransportFactoryTest.class);
 
@@ -49,50 +49,46 @@
             final boolean wantClientAuth = ((i & 0x1) == 1);
             final boolean needClientAuth = ((i & 0x2) == 1);
 
-            String options = "wantClientAuth=" + (wantClientAuth ? "true" : "false") +
-                    "&needClientAuth=" + (needClientAuth ? "true" : "false");
+            String options = "wantClientAuth=" + (wantClientAuth ? "true" : "false") + "&needClientAuth="
+                             + (needClientAuth ? "true" : "false");
 
             try {
-                sslTransportServer = (SslTransportServer)
-                        factory.doBind("brokerId", new URI("ssl://localhost:61616?" + options));
-            }
-            catch (Exception e) {
+                sslTransportServer = (SslTransportServer)factory.doBind("brokerId", new URI(
+                                                                                            "ssl://localhost:61616?"
+                                                                                                + options));
+            } catch (Exception e) {
                 fail("Unable to bind to address: " + e.getMessage());
             }
 
             assertEquals("Created ServerSocket did not have correct wantClientAuth status.",
-                    sslTransportServer.getWantClientAuth(), wantClientAuth);
+                         sslTransportServer.getWantClientAuth(), wantClientAuth);
 
             assertEquals("Created ServerSocket did not have correct needClientAuth status.",
-                    sslTransportServer.getNeedClientAuth(), needClientAuth);
+                         sslTransportServer.getNeedClientAuth(), needClientAuth);
 
             try {
                 sslTransportServer.stop();
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                 fail("Unable to stop TransportServer: " + e.getMessage());
             }
         }
     }
 
     private int getMthNaryDigit(int number, int digitIdx, int numBase) {
-        return (number / ((int) Math.pow(numBase, digitIdx))) % numBase;
+        return (number / ((int)Math.pow(numBase, digitIdx))) % numBase;
     }
 
     public void testCompositeConfigure() throws IOException {
         // The 5 options being tested.
         int optionSettings[] = new int[5];
 
-        String optionNames[] = {
-                "wantClientAuth",
-                "needClientAuth",
-                "socket.wantClientAuth",
-                "socket.needClientAuth",
-                "socket.useClientMode"
-        };
+        String optionNames[] = {"wantClientAuth", "needClientAuth", "socket.wantClientAuth",
+                                "socket.needClientAuth", "socket.useClientMode"};
 
-        // Using a trinary interpretation of i to set all possible values of stub options for socket and transport.
-        // 2 transport options, 3 socket options, 3 settings for each option => 3^5 = 243 combos.
+        // Using a trinary interpretation of i to set all possible values of
+        // stub options for socket and transport.
+        // 2 transport options, 3 socket options, 3 settings for each option =>
+        // 3^5 = 243 combos.
         for (int i = 0; i < 243; ++i) {
             Map options = new HashMap();
 
@@ -110,8 +106,7 @@
 
             try {
                 transport = new StubSslTransport(null, socketStub);
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                 fail("Unable to create StubSslTransport: " + e.getMessage());
             }
 
@@ -129,8 +124,7 @@
             // lets start the transport to force the introspection
             try {
                 transport.start();
-            }
-            catch (Exception e) {
+            } catch (Exception e) {
                 // ignore bad connection
             }
 
@@ -138,16 +132,16 @@
                 log.info("sheiite");
             }
 
-            assertEquals("wantClientAuth was not properly set for iteration: " + i,
-                    optionSettings[0], transport.getWantClientAuthStatus());
-            assertEquals("needClientAuth was not properly set for iteration: " + i,
-                    optionSettings[1], transport.getNeedClientAuthStatus());
-            assertEquals("socket.wantClientAuth was not properly set for iteration: " + i,
-                    optionSettings[2], socketStub.getWantClientAuthStatus());
-            assertEquals("socket.needClientAuth was not properly set for iteration: " + i,
-                    optionSettings[3], socketStub.getNeedClientAuthStatus());
-            assertEquals("socket.useClientMode was not properly set for iteration: " + i,
-                    optionSettings[4], socketStub.getUseClientModeStatus());
+            assertEquals("wantClientAuth was not properly set for iteration: " + i, optionSettings[0],
+                         transport.getWantClientAuthStatus());
+            assertEquals("needClientAuth was not properly set for iteration: " + i, optionSettings[1],
+                         transport.getNeedClientAuthStatus());
+            assertEquals("socket.wantClientAuth was not properly set for iteration: " + i, optionSettings[2],
+                         socketStub.getWantClientAuthStatus());
+            assertEquals("socket.needClientAuth was not properly set for iteration: " + i, optionSettings[3],
+                         socketStub.getNeedClientAuthStatus());
+            assertEquals("socket.useClientMode was not properly set for iteration: " + i, optionSettings[4],
+                         socketStub.getUseClientModeStatus());
         }
     }
 }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSSLSocketFactory.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSSLSocketFactory.java?view=diff&rev=563982&r1=563981&r2=563982
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSSLSocketFactory.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/transport/tcp/StubSSLSocketFactory.java Wed Aug  8 11:56:59 2007
@@ -20,33 +20,30 @@
 import java.io.IOException;
 import java.net.InetAddress;
 import java.net.ServerSocket;
-import java.net.Socket;
 
 import javax.net.ssl.SSLServerSocketFactory;
 
 public class StubSSLSocketFactory extends SSLServerSocketFactory {
-    
+
     private final ServerSocket retServerSocket;
-    
+
     public StubSSLSocketFactory(ServerSocket returnServerSocket) {
         retServerSocket = returnServerSocket;
     }
-    
+
     public ServerSocket createServerSocket(int arg0) throws IOException {
         return retServerSocket;
     }
 
-    public ServerSocket createServerSocket(int arg0, int arg1)
-            throws IOException {
+    public ServerSocket createServerSocket(int arg0, int arg1) throws IOException {
         return retServerSocket;
     }
-    
-    public ServerSocket createServerSocket(int arg0, int arg1, InetAddress arg2)
-    throws IOException {
+
+    public ServerSocket createServerSocket(int arg0, int arg1, InetAddress arg2) throws IOException {
         return retServerSocket;
     }
-    
-    // --- Stubbed Methods --- 
+
+    // --- Stubbed Methods ---
 
     public String[] getDefaultCipherSuites() {
         return null;