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

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

Christophe Levesque created WICKET-5054:
-------------------------------------------

             Summary: 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
            Reporter: Christophe Levesque


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