[portal-commits] JBoss Portal SVN: r8948 - in modules/web/trunk/web: src/main/org/jboss/portal/test/web/container and 1 other directories.

portal-commits at lists.jboss.org portal-commits at lists.jboss.org
Thu Nov 15 11:07:42 EST 2007


Author: julien at jboss.com
Date: 2007-11-15 11:07:42 -0500 (Thu, 15 Nov 2007)
New Revision: 8948

Modified:
   modules/web/trunk/web/build.xml
   modules/web/trunk/web/src/main/org/jboss/portal/test/web/container/ServletContainerTestCase.java
   modules/web/trunk/web/src/main/org/jboss/portal/web/RequestInfo.java
Log:
update web module to common update

Modified: modules/web/trunk/web/build.xml
===================================================================
--- modules/web/trunk/web/build.xml	2007-11-15 15:54:55 UTC (rev 8947)
+++ modules/web/trunk/web/build.xml	2007-11-15 16:07:42 UTC (rev 8948)
@@ -761,13 +761,4 @@
 
    </target>
 
-   <target name="reports" depends="init">
-      <junitreport todir="output/tests">
-         <fileset dir="output/tests">
-            <include name="TEST-*.xml"/>
-         </fileset>
-         <report format="frames" todir="output/tests"/>
-       </junitreport>
-   </target>
-
 </project>

Modified: modules/web/trunk/web/src/main/org/jboss/portal/test/web/container/ServletContainerTestCase.java
===================================================================
--- modules/web/trunk/web/src/main/org/jboss/portal/test/web/container/ServletContainerTestCase.java	2007-11-15 15:54:55 UTC (rev 8947)
+++ modules/web/trunk/web/src/main/org/jboss/portal/test/web/container/ServletContainerTestCase.java	2007-11-15 16:07:42 UTC (rev 8948)
@@ -27,6 +27,7 @@
 import org.jboss.portal.web.WebAppEvent;
 import org.jboss.portal.web.spi.ServletContainerContext;
 import org.jboss.portal.common.util.CollectionBuilder;
+import org.jboss.portal.common.util.Tools;
 import org.jboss.portal.test.web.WebAppRegistry;
 import org.jboss.unit.api.pojo.annotations.Test;
 import EDU.oswego.cs.dl.util.concurrent.SynchronizedBoolean;
@@ -134,11 +135,11 @@
       //
       scc.registration.registerWebApp(new WebAppContextImpl("/foo"));
       scc.registration.registerWebApp(new WebAppContextImpl("/bar"));
-      assertEquals(new CollectionBuilder().add("/foo").add("/bar").toHashSet(), registry.getKeys());
+      assertEquals(Tools.toSet(new String[]{"/foo", "/bar"}), registry.getKeys());
 
       //
       scc.registration.cancel();
-      assertEquals(new CollectionBuilder().toHashSet(), registry.getKeys());
+      assertEquals(Tools.toSet(new String[]{}), registry.getKeys());
    }
 
    @Test
@@ -155,19 +156,19 @@
       //
       container.register(scc);
       scc.registration.registerWebApp(new WebAppContextImpl("/foo"));
-      assertEquals(new CollectionBuilder().add("/foo").toHashSet(), registry.getKeys());
+      assertEquals(Tools.toSet(new String[]{"/foo"}), registry.getKeys());
 
       //
       container.addWebAppListener(registry);
-      assertEquals(new CollectionBuilder().add("/foo").toHashSet(), registry.getKeys());
+      assertEquals(Tools.toSet(new String[]{"/foo"}), registry.getKeys());
 
       //
       container.removeWebAppListener(registry);
-      assertEquals(new CollectionBuilder().toHashSet(), registry.getKeys());
+      assertEquals(Tools.toSet(new String[]{}), registry.getKeys());
 
       //
       container.removeWebAppListener(registry);
-      assertEquals(new CollectionBuilder().toHashSet(), registry.getKeys());
+      assertEquals(Tools.toSet(new String[]{}), registry.getKeys());
    }
 
    @Test
@@ -188,31 +189,31 @@
       container.addWebAppListener(registry);
 
       // Assert we received events during the registration
-      assertEquals(new CollectionBuilder().add("/foo").add("/bar").toHashSet(), registry.getKeys());
+      assertEquals(Tools.toSet(new String[]{"/foo", "/bar"}), registry.getKeys());
 
       // Add a new web app
       scc.registration.registerWebApp(new WebAppContextImpl("/juu"));
 
       // Assert we now have 3 web apps
-      assertEquals(new CollectionBuilder().add("/foo").add("/bar").add("/juu").toHashSet(), registry.getKeys());
+      assertEquals(Tools.toSet(new String[]{"/foo", "/bar", "/juu"}), registry.getKeys());
 
       // Remove one web app
       scc.registration.unregisterWebApp("/foo");
 
       // Assert we have 2 web apps
-      assertEquals(new CollectionBuilder().add("/bar").add("/juu").toHashSet(), registry.getKeys());
+      assertEquals(Tools.toSet(new String[]{"/bar", "/juu"}), registry.getKeys());
 
       // Remove registration
       container.removeWebAppListener(registry);
 
       // Assert we receveived events during removal
-      assertEquals(new CollectionBuilder().toHashSet(), registry.getKeys());
+      assertEquals(Tools.toSet(new String[]{}), registry.getKeys());
 
       // W Add a new web app
       scc.registration.registerWebApp(new WebAppContextImpl("/foo"));
 
       // hen unregistered, a new web app registration does not send event
-      assertEquals(new CollectionBuilder().toHashSet(), registry.getKeys());
+      assertEquals(Tools.toSet(new String[]{}), registry.getKeys());
    }
 
    @Test
@@ -282,6 +283,6 @@
       //
       scc.registration.registerWebApp(new WebAppContextImpl("/foo"));
       assertTrue(called.get());
-      assertEquals(new CollectionBuilder().add("/foo").toHashSet(), registry.getKeys());
+      assertEquals(Tools.toSet(new String[]{"/foo"}), registry.getKeys());
    }
 }

Modified: modules/web/trunk/web/src/main/org/jboss/portal/web/RequestInfo.java
===================================================================
--- modules/web/trunk/web/src/main/org/jboss/portal/web/RequestInfo.java	2007-11-15 15:54:55 UTC (rev 8947)
+++ modules/web/trunk/web/src/main/org/jboss/portal/web/RequestInfo.java	2007-11-15 16:07:42 UTC (rev 8948)
@@ -165,7 +165,7 @@
       //
       this.method = method;
       this.queryParameterMap = new ParameterMap(queryParameterMap);
-      this.bodyParameterMap = new ParameterMap(bodyParameterMap);
+      this.bodyParameterMap = bodyParameterMap != null ? new ParameterMap(bodyParameterMap) : null;
       this.mediaType = mediaType;
    }
 




More information about the portal-commits mailing list