[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-795) allow MockHttpServletRequest and MockExternalContext to support cookies

Matt Drees (JIRA) jira-events at jboss.com
Thu Feb 8 01:52:41 EST 2007


     [ http://jira.jboss.com/jira/browse/JBSEAM-795?page=all ]

Matt Drees updated JBSEAM-795:
------------------------------

    Attachment: MockExternalContext-patch.txt
                MockHttpServletRequest-patch.txt

These patches let the mock objects handle cookies.  SeamTest could be expanded to actually use cookies, but how that would work should probably be decided by someone other than me.  For now, they prevent the NullPointerException above.

> allow MockHttpServletRequest and MockExternalContext to support cookies
> -----------------------------------------------------------------------
>
>                 Key: JBSEAM-795
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-795
>             Project: JBoss Seam
>          Issue Type: Patch
>          Components: Tools
>    Affects Versions: 1.1.6.GA
>            Reporter: Matt Drees
>            Priority: Minor
>         Attachments: MockExternalContext-patch.txt, MockHttpServletRequest-patch.txt
>
>
> After updating to 1.1.6 and using Seam/Security authentication, my login integration test failed with a NPE:
> java.lang.NullPointerException
> 	at org.jboss.seam.core.Selector.getCookieValue(Selector.java:59)
> 	at org.jboss.seam.security.Identity.initCredentialsFromCookie(Identity.java:91)
> 	at org.jboss.seam.security.Identity.create(Identity.java:85)
> 	...
> 	at org.uscm.crs.test.LoginTest.testLogin(LoginTest.java:25)
> The root cause is the MockExternalContext always returned null for getRequestCookieMap().  

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list