Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4915

org.apache.wicket.util.resource.Patht#find fails on Windows

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 6.3.0
    • Fix Version/s: 6.4.0
    • Component/s: wicket
    • Labels:
      None

      Description

      Windows users report that test org.apache.wicket.util.resource.PathTest#loadFromRootUsingSubpathInFilename fails for them.

      The suggested solution is to rework Path#find to:

      @Override
      public IResourceStream find(final Class<?> clazz, final String pathname)
      {
      final File file = new File(folder, pathname);
      final File pathOnlyFile = new File(pathname);

      if (file.exists())

      { return new FileResourceStream(file); }

      if (pathOnlyFile.exists())

      { return new FileResourceStream(pathOnlyFile); }

      else

      { return null; }

      }

      but I'm not quite sure in this solution.

        Attachments

          Activity

            People

            • Assignee:
              mgrigorov Martin Grigorov
              Reporter:
              mgrigorov Martin Grigorov
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: