You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Sven Meier (JIRA)" <ji...@apache.org> on 2013/02/24 10:54:13 UTC

[jira] [Resolved] (WICKET-5054) Possible bug in org.apache.wicket.util.lang.Packages when building path with repeating names

     [ https://issues.apache.org/jira/browse/WICKET-5054?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sven Meier resolved WICKET-5054.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 1.5.11
                   6.7.0

partially reverted 78052bf for Packages#absolutePath(), adjusted IPackageResourceGuard
                
> Possible bug in org.apache.wicket.util.lang.Packages when building path with repeating names
> --------------------------------------------------------------------------------------------
>
>                 Key: WICKET-5054
>                 URL: https://issues.apache.org/jira/browse/WICKET-5054
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 6.6.0, 1.5.10
>            Reporter: Christophe Levesque
>            Assignee: Sven Meier
>             Fix For: 6.7.0, 1.5.11
>
>
> When trying to build the absolute path from package "com.foo.bar" with relative path "baz/foo/qux" in method org.apache.wicket.util.lang.Packages.absolutePath(String, String) the block:
> {code}
> 				else if (absolutePath.size() <= i || absolutePath.get(i).equals(folder) == false)
> 				{
> 					// Add to stack
> 					absolutePath.add(folder);
> 				}
> {code}
> doesn't run for the "foo" part of the relative path because absolutePath.get(1) == foo from the package == foo from the relative path.
> So the resulting absolute path is "com/foo/bar/baz/qux" rather than the expected "com/foo/bar/baz/foo/qux".
> Seems like the "else if" should just be a "else".

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira