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.

Reply via email to