Wicket
  1. Wicket
  2. WICKET-861

NumberFormatException with UrlCompressingWebRequestProcessor in WicketTester

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.0-beta3
    • Fix Version/s: 1.3.5, 1.4-RC1
    • Component/s: wicket
    • Labels:
      None
    • Environment:
      Wicket 1.3.0 from Trunk
      JDK 6

      Description

      In my Application I use UrlCompressingWebRequestProcessor. Now I have a JUnit test case with WicketTester and that Application like this:

      tester.startPage(new ITestPageSource() {
      public Page getTestPage()

      { PageParameters params = new PageParameters(); params.add("0", "param"); return new MyPage(params); }

      });

      I get an Exception:

      java.lang.NumberFormatException: For input string: "testPage"
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
      at java.lang.Integer.parseInt(Integer.java:447)
      at java.lang.Integer.parseInt(Integer.java:497)
      at org.apache.wicket.protocol.http.request.urlcompressing.UrlCompressor.getComponentAndInterfaceForUID(UrlCompressor.java:124)
      at org.apache.wicket.protocol.http.request.urlcompressing.UrlCompressingWebRequestProcessor.resolveListenerInterfaceTarget(UrlCompressingWebRequestProcessor.java:81)
      at org.apache.wicket.request.AbstractRequestCycleProcessor.resolveRenderedPage(AbstractRequestCycleProcessor.java:440)
      at org.apache.wicket.protocol.http.WebRequestCycleProcessor.resolve(WebRequestCycleProcessor.java:139)
      at org.apache.wicket.RequestCycle.step(RequestCycle.java:1091)
      at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1177)
      at org.apache.wicket.RequestCycle.request(RequestCycle.java:500)
      at org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:381)
      at org.apache.wicket.protocol.http.MockWebApplication.processRequestCycle(MockWebApplication.java:368)
      at org.apache.wicket.util.tester.BaseWicketTester.executeListener(BaseWicketTester.java:239)
      at org.apache.wicket.util.tester.BaseWicketTester.startPage(BaseWicketTester.java:224)

      I could work around this by using WebRequestCycleProcessor for my testing-application.

        Issue Links

          Activity

          Hide
          Juergen Donnerstag added a comment -

          please see UrlCompressingWebRequestProcessorTest

          Show
          Juergen Donnerstag added a comment - please see UrlCompressingWebRequestProcessorTest
          Hide
          Johan Compagner added a comment -

          do you have a complete unit test case for us?

          Show
          Johan Compagner added a comment - do you have a complete unit test case for us?
          Hide
          Eelco Hillenius added a comment -

          bulk set issues to next version. I only did a quick check (and filtered some out for 1.3.1), but we can always bump em again.

          Show
          Eelco Hillenius added a comment - bulk set issues to next version. I only did a quick check (and filtered some out for 1.3.1), but we can always bump em again.

            People

            • Assignee:
              Igor Vaynberg
              Reporter:
              Rüdiger Schulz
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development