Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-2177

WebRequestCycle throwing a CCE when the response is not a WebResponse

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 1.4-RC3
    • None
    • wicket
    • 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?

      Attachments

        Activity

          People

            ivaynberg Igor Vaynberg
            topping Brian Topping
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: