You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Martin Grigorov (JIRA)" <ji...@apache.org> on 2011/01/02 17:04:46 UTC
[jira] Assigned: (WICKET-3300) Redundant test in MountedMapper
[ https://issues.apache.org/jira/browse/WICKET-3300?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Grigorov reassigned WICKET-3300:
---------------------------------------
Assignee: Martin Grigorov
> Redundant test in MountedMapper
> -------------------------------
>
> Key: WICKET-3300
> URL: https://issues.apache.org/jira/browse/WICKET-3300
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Reporter: Willis Blackburn
> Assignee: Martin Grigorov
> Priority: Trivial
>
> In MountedMapper I see:
> // check if the URL is long enough and starts with the proper segments
> else if (url.getSegments().size() >= mountSegments.length &&
> urlStartsWith(url, mountSegments))
> but the urlStartsWith method has:
> if (url.getSegments().size() < segments.length)
> and returns false if that check fails, so you can skip the check before calling urlStartsWith. Which makes sense--a URL can't "start with" some prefix if its shorter than the prefix.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.