Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-363

FileURLConnection needs URL decode for JDK 1.4

XMLWordPrintable

      SourceForge Submitter: andieveritt .
      In the constructor of
      org.jboss.net.protocol.file.FileURLConnection a new
      File is created from the supplied URL. In JDK 1.4 the
      result of URL.getPath() is URL encoded which means on
      windows with a path with a space you get
      'C:\Program%20Files\foo\bar' - which doesn't work.
      I have tested a modified version of FileURLConnection
      which URL decodes the result. This resolves the issue.
      I have attached the modified version. The only change
      is on Line 45:

      • file = new File(url.getPath().replace('/',
        File.separatorChar).replace('|', ':'));
        + file = new
        File(java.net.URLDecoder.decode(url.getPath()).replace('/',
        File.separatorChar).replace('|', ':'));

              starksm64 Scott Stark (Inactive)
              sourceforge-user SourceForge legacy user (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved: