IvyDE
  1. IvyDE
  2. IVYDE-179

IvyDE does not set javadoc archive path properly

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0.final
    • Fix Version/s: 2.0.0.final
    • Component/s: classpath container
    • Labels:
      None
    • Environment:

      Win 2k, German (has space chars in user's home dir path)

      Description

      After a resolve, the path to the javadoc archive is not set properly, when the path contains spaces.
      In this case, the path to the Ivy cache contains spaces, which are replaced by '%20' in the archive path field
      on the propery page of the jar.

      C:\Dokumente%20und%20Einstellungen\m.weber\.ivy2\cache\org.junit\junit\javadocs\junit-4.5.zip
      should be
      C:\Dokumente und Einstellungen\...

      If I manually replaced the %20, javadoc location is valid and can be opened.

        Activity

        Hide
        Martin Weber added a comment -

        I can confirm that the javadoc archive is now set properly.

        Show
        Martin Weber added a comment - I can confirm that the javadoc archive is now set properly.
        Hide
        Nicolas Lalevée added a comment -

        I am not sure who is the real culprit here, Eclipse or IvyDE.

        To encode the path, IvyDE is using file.toURI().toURL().toExternalString(), so as expected, the spaces are being encoded in %20, as spaces are not allowed in urls (the Eclipse API is expecting an URL). But internally Eclipse does file.toURL().toExternalString(), which is deprecated in Java 6:
        http://java.sun.com/javase/6/docs/api/java/io/File.html#toURL()

        So here I just made IvyDE behave as Eclipse internally.

        Show
        Nicolas Lalevée added a comment - I am not sure who is the real culprit here, Eclipse or IvyDE. To encode the path, IvyDE is using file.toURI().toURL().toExternalString() , so as expected, the spaces are being encoded in %20, as spaces are not allowed in urls (the Eclipse API is expecting an URL). But internally Eclipse does file.toURL().toExternalString() , which is deprecated in Java 6: http://java.sun.com/javase/6/docs/api/java/io/File.html#toURL( ) So here I just made IvyDE behave as Eclipse internally.

          People

          • Assignee:
            Nicolas Lalevée
            Reporter:
            Martin Weber
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development