Wicket
  1. Wicket
  2. WICKET-5054

Possible bug in org.apache.wicket.util.lang.Packages when building path with repeating names

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.6.0, 1.5.10
    • Fix Version/s: 6.7.0, 1.5.11
    • Component/s: wicket
    • Labels:
      None

      Description

      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:

      				else if (absolutePath.size() <= i || absolutePath.get(i).equals(folder) == false)
      				{
      					// Add to stack
      					absolutePath.add(folder);
      				}
      

      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".

        Activity

          People

          • Assignee:
            Sven Meier
            Reporter:
            Christophe Levesque
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development