Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
1.4-RC3
-
None
-
None
-
JDK 1.6 OSX
Description
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?