[portal-commits] JBoss Portal SVN: r11818 - in branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal: test/core/model/portal/coordination and 1 other directory.
portal-commits at lists.jboss.org
portal-commits at lists.jboss.org
Fri Sep 5 12:31:11 EDT 2008
Author: chris.laprun at jboss.com
Date: 2008-09-05 12:31:11 -0400 (Fri, 05 Sep 2008)
New Revision: 11818
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java
Log:
- getEventWirings was not processing all the events due to a weird break...
- Added test case that replicates the bug.
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java 2008-09-04 21:04:54 UTC (rev 11817)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/coordination/CoordinationService.java 2008-09-05 16:31:11 UTC (rev 11818)
@@ -356,7 +356,7 @@
if(propName.startsWith(PREFIX_EVENT_NAME))
{
String en = propName.substring(PREFIX_EVENT_NAME.length() + 1);
- EventInfoPOJO info = null;
+ EventInfoPOJO info;
if (!events.keySet().contains(en))
{
@@ -390,8 +390,6 @@
info.getDestinations().put((Window)window, qname);
}
}
-
- break;
}
}
}
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java 2008-09-04 21:04:54 UTC (rev 11817)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/test/core/model/portal/coordination/CoordinationServiceTestCase.java 2008-09-05 16:31:11 UTC (rev 11818)
@@ -469,6 +469,32 @@
TransactionAssert.commitTransaction();
}
+ public void testAddMultipleEventWirings() throws IllegalCoordinationException
+ {
+ TransactionAssert.beginTransaction();
+
+ Portal portal1 = container.getContext("").getPortal("Portal_1");
+ Page page1 = portal1.getPage("Page_1");
+
+ Window w1 = page1.getWindow("Window_1");
+ Window w2 = page1.getWindow("Window_2");
+
+ Map<Window, QName> s1 = new HashMap<Window, QName>();
+ s1.put(w1, new QName("juju", "foo"));
+
+ Map<Window, QName> d1 = new HashMap<Window, QName>();
+ d1.put(w2, new QName("bobo", "bar"));
+
+ cos.setEventWiring(s1, d1, "event1");
+ cos.setEventWiring(s1, d1, "event2");
+
+ Collection<EventWiringInfo> events = cos.getEventWirings(page1);
+ assertNotNull(events);
+ assertEquals(2, events.size());
+
+ TransactionAssert.commitTransaction();
+ }
+
public void testRenameWindowBinding() throws Exception
{
TransactionAssert.beginTransaction();
More information about the portal-commits
mailing list