Uploaded image for project: 'Olingo'
  1. Olingo
  2. OLINGO-239

ClassHelper doesn't find classes when there's a space in the path

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • V2 1.2.0
    • V2 2.0.0
    • odata2-annotation
    • None

    Description

      When you have space in your path and ask the ClassHelper to loadClasses(...), it doesn't find anything. The problem is because an URL class is used where the space converted to a %20. This URL does not point to a file anymore.

      Please call the following function (using .toUri().getPath()) to fill fqnForClasses in line 71.

      {{
      private static Collection<String> getFqnForClasses(String packageToScan, URL url, FilenameFilter ff) {
      try {
      File folder = new File(url.toURI().getPath());
      if (folder.isDirectory())

      { return getClassFqnFromDir(ff, folder, packageToScan); }

      else if (isJarFile(url))

      { return getClassFqnFromJar(url.getFile().substring(5), packageToScan); }

      } catch (URISyntaxException ex) {
      }
      return null;
      }
      }}

      Thank you

      Attachments

        Activity

          People

            mirbo mibo
            gerbenk Gerben Kegel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: