[jboss-cvs] JBossCache/tests/functional/org/jboss/cache/multiplexer ...
Manik Surtani
manik at jboss.org
Wed May 23 06:28:51 EDT 2007
User: msurtani
Date: 07/05/23 06:28:51
Modified: tests/functional/org/jboss/cache/multiplexer
MultiplexerTestHelper.java BadMuxConfigTest.java
ChannelInjectionPreferenceTest.java
Log:
Initiated a bunch of performance fixes, including replacing CopyOnWriteArraySets with org.jboss.cache.util.concurrent.ConcurrentHashSet.
Also ran an imports optimiser on the code base - there were a lot of unused imports floating about.
Revision Changes Path
1.4 +36 -39 JBossCache/tests/functional/org/jboss/cache/multiplexer/MultiplexerTestHelper.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: MultiplexerTestHelper.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/multiplexer/MultiplexerTestHelper.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- MultiplexerTestHelper.java 9 May 2007 18:32:55 -0000 1.3
+++ MultiplexerTestHelper.java 23 May 2007 10:28:51 -0000 1.4
@@ -21,14 +21,6 @@
*/
package org.jboss.cache.multiplexer;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.StringTokenizer;
-
-import javax.xml.parsers.DocumentBuilder;
-import javax.xml.parsers.DocumentBuilderFactory;
-
import org.jboss.cache.Cache;
import org.jgroups.ChannelFactory;
import org.jgroups.JChannel;
@@ -36,12 +28,19 @@
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+import java.util.StringTokenizer;
+
/**
* Utility class that can associate a cache with a multiplexer-enabled
* JGroups ChannelFactory.
*
* @author <a href="brian.stansberry at jboss.com">Brian Stansberry</a>
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class MultiplexerTestHelper
{
@@ -81,7 +80,6 @@
*
* @param cache the cache from which the protocol stack config should
* be obtained
- *
* @return the channel factory.
* @throws Exception
*/
@@ -103,7 +101,6 @@
*
* @param muxConfig Element that looks like the root element
* of a multiplexer stacks.xml file.
- *
* @return the channel factory.
* @throws Exception
*/
@@ -152,7 +149,7 @@
if (nameEnd > 0)
{
protName = protocol.substring(0, nameEnd);
- attribs = protocol.substring(nameEnd + 1, protocol.length() -1);
+ attribs = protocol.substring(nameEnd + 1, protocol.length() - 1);
}
Element element = doc.createElement(protName);
if (attribs != null && attribs.length() > 0)
@@ -163,7 +160,7 @@
String attrib = inner.nextToken();
int eq = attrib.indexOf('=');
String name = attrib.substring(0, eq);
- String value = attrib.substring(eq +1);
+ String value = attrib.substring(eq + 1);
element.setAttribute(name, value);
}
}
1.6 +1 -2 JBossCache/tests/functional/org/jboss/cache/multiplexer/BadMuxConfigTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: BadMuxConfigTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/multiplexer/BadMuxConfigTest.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- BadMuxConfigTest.java 9 May 2007 18:32:55 -0000 1.5
+++ BadMuxConfigTest.java 23 May 2007 10:28:51 -0000 1.6
@@ -1,7 +1,6 @@
package org.jboss.cache.multiplexer;
import junit.framework.TestCase;
-
import org.jboss.cache.Cache;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.config.Configuration;
@@ -12,7 +11,7 @@
* configuration is incorrect.
*
* @author <a href="brian.stansberry at jboss.com">Brian Stansberry</a>
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
*/
public class BadMuxConfigTest extends TestCase
{
1.2 +5 -6 JBossCache/tests/functional/org/jboss/cache/multiplexer/ChannelInjectionPreferenceTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ChannelInjectionPreferenceTest.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/tests/functional/org/jboss/cache/multiplexer/ChannelInjectionPreferenceTest.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- ChannelInjectionPreferenceTest.java 9 May 2007 18:32:32 -0000 1.1
+++ ChannelInjectionPreferenceTest.java 23 May 2007 10:28:51 -0000 1.2
@@ -1,7 +1,6 @@
package org.jboss.cache.multiplexer;
import junit.framework.TestCase;
-
import org.jboss.cache.Cache;
import org.jboss.cache.DefaultCacheFactory;
import org.jboss.cache.config.Configuration;
@@ -14,7 +13,7 @@
* a configured JChannelFactory and stack name.
*
* @author <a href="brian.stansberry at jboss.com">Brian Stansberry</a>
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
*/
public class ChannelInjectionPreferenceTest extends TestCase
{
More information about the jboss-cvs-commits
mailing list