You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Carl-Eric Menzel (JIRA)" <ji...@apache.org> on 2012/05/14 18:19:52 UTC
[jira] [Resolved] (WICKET-4558) WicketTester fails with a
StringIndexOutOfBounds exception when using an external redirect
[ https://issues.apache.org/jira/browse/WICKET-4558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carl-Eric Menzel resolved WICKET-4558.
--------------------------------------
Resolution: Fixed
Fix Version/s: 1.5.7
Fixed in 1.5.x and master.
I'm detecting external redirects and simply stop processing the request at that point. WicketTester has a new method #assertRedirectUrl that allows to check for a correct redirect.
No compatibility issue, only one new public concrete method. The old failing behavior is a bug and prevented proper testing anyway.
> WicketTester fails with a StringIndexOutOfBounds exception when using an external redirect
> ------------------------------------------------------------------------------------------
>
> Key: WICKET-4558
> URL: https://issues.apache.org/jira/browse/WICKET-4558
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.5.6
> Reporter: Carl-Eric Menzel
> Assignee: Carl-Eric Menzel
> Priority: Minor
> Fix For: 1.5.7
>
>
> When testing a component that e.g. throws a RedirectToUrlException("http://foo/") WicketTester fails with a StringIndexOutOfBoundsException in ServletWebRequest#getContextRelativeUrl. I'm aware that WT doesn't currently support this and needs setFollowRedirects(false) in this case, but there should be a more meaningful error message than this.
> I'll attempt to distinguish local redirects from external ones and providing the external URL in a new assertExternalRedirectUrl method instead of having it crash and burn.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira