[
https://issues.apache.org/jira/browse/WICKET-210?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465498
]
Igor Vaynberg commented on WICKET-210:
--------------------------------------
the problem is that now the version manager needs access to request, because it
performs some clever version merger for redirects. so this means that things
that create changes in version manager should only be accessed within a
requestcycle which is a reasonable requirement for wicket components. so what
we need to do is to think about how to patch wicket tester to better mock the
environment, or somehow decouple the components more.
> Fixing DisabledComponentTest
> ----------------------------
>
> Key: WICKET-210
> URL: https://issues.apache.org/jira/browse/WICKET-210
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Reporter: Jean-Baptiste Quenot
> Priority: Minor
> Attachments: 20070113-wicket-1.x-DisabledComponentTest
>
>
> -------------------------------------------------------------------------------
> Test set: wicket.DisabledComponentTest
> -------------------------------------------------------------------------------
> Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.281 sec <<<
> FAILURE!
> testDisabled(wicket.DisabledComponentTest) Time elapsed: 0.024 sec <<<
> ERROR!
> java.lang.NullPointerException
> at wicket.Component.getRequest(Component.java:1066)
> at wicket.Page.mayTrackChangesFor(Page.java:1337)
> at wicket.Page.componentStateChanging(Page.java:1068)
> at wicket.Component.addStateChange(Component.java:2300)
> at wicket.Component.setEnabled(Component.java:1872)
> at
> wicket.DisabledComponentTest.testDisabled(DisabledComponentTest.java:53)
> The attached patch ensures that Page.mayTrackChangesFor() returns false when
> there is no current RequestCycle.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira