You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Johan Compagner (JIRA)" <ji...@apache.org> on 2009/03/18 22:07:50 UTC

[jira] Commented: (WICKET-2177) WebRequestCycle throwing a CCE when the response is not a WebResponse

    [ https://issues.apache.org/jira/browse/WICKET-2177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12683173#action_12683173 ] 

Johan Compagner commented on WICKET-2177:
-----------------------------------------

i dont know why that is a StringResponse at that time
But why do you call getWebResponse() in com.example.web.auth.AuthorizationStrategyImpl.isActionAuthorized(AuthorizationStrategyImpl.java:110)  ?

do you really need there a webresponse?

> WebRequestCycle throwing a CCE when the response is not a WebResponse
> ---------------------------------------------------------------------
>
>                 Key: WICKET-2177
>                 URL: https://issues.apache.org/jira/browse/WICKET-2177
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.4-RC3
>         Environment: JDK 1.6 OSX
>            Reporter: Brian Topping
>
> While working with Brix, I found a situation where a WebRequestCycle object was embedded with a StringResponse.  This causes the following CCE:
> Caused by: java.lang.ClassCastException: org.apache.wicket.response.StringResponse cannot be cast to org.apache.wicket.protocol.http.WebResponse
> 	at org.apache.wicket.protocol.http.WebRequestCycle.getWebResponse(WebRequestCycle.java:108)
> 	at com.example.web.auth.AuthorizationStrategyImpl.isActionAuthorized(AuthorizationStrategyImpl.java:110)
> 	... 59 more
> We can't avoid using a WebRequestCycle if we want to generate HTML, isn't that correct?  So I guess getWebResponse needs to cast to a covariant supertype of WebResponse?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.