[jboss-svn-commits] JBoss Portal SVN: r5234 - in trunk/wsrp/src/main/org/jboss/portal: test/wsrp wsrp/consumer

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Sep 20 18:41:17 EDT 2006


Author: chris.laprun at jboss.com
Date: 2006-09-20 18:41:15 -0400 (Wed, 20 Sep 2006)
New Revision: 5234

Modified:
   trunk/wsrp/src/main/org/jboss/portal/test/wsrp/ProducerSessionInformationTestCase.java
   trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerSessionInformation.java
Log:
JBPORTAL-1051: fixed and added test case.

Modified: trunk/wsrp/src/main/org/jboss/portal/test/wsrp/ProducerSessionInformationTestCase.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/test/wsrp/ProducerSessionInformationTestCase.java	2006-09-20 22:37:22 UTC (rev 5233)
+++ trunk/wsrp/src/main/org/jboss/portal/test/wsrp/ProducerSessionInformationTestCase.java	2006-09-20 22:41:15 UTC (rev 5234)
@@ -132,6 +132,9 @@
    {
       info.setUserCookie(new Cookie[]{createCookie("name", "value", 1)});
 
+      info.replaceUserCookiesWith(null);
+      assertEquals("name=value", info.getUserCookie());
+
       ProducerSessionInformation other = new ProducerSessionInformation();
 
       info.replaceUserCookiesWith(other);

Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerSessionInformation.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerSessionInformation.java	2006-09-20 22:37:22 UTC (rev 5233)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/consumer/ProducerSessionInformation.java	2006-09-20 22:41:15 UTC (rev 5234)
@@ -218,7 +218,7 @@
 
    public void replaceUserCookiesWith(ProducerSessionInformation currentSessionInfo)
    {
-      if (currentSessionInfo.userCookie != null && currentSessionInfo.userCookie.length > 0)
+      if (currentSessionInfo != null && currentSessionInfo.userCookie != null && currentSessionInfo.userCookie.length > 0)
       {
          this.userCookie = currentSessionInfo.userCookie;
       }




More information about the jboss-svn-commits mailing list