Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-5779

[classlib][luni] java.io.FileNotFoundException Issue with file://localhost

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • None
    • Classlib
    • None

    Description

      Stack trace

      [dims@dims-desktop test]$java -cp . HarmonyFileLocalhost
      Uncaught exception in main:
      java.io.FileNotFoundException: /localhost/home/dims/harmony/test/./HarmonyFileLocalhost.java
      at org.apache.harmony.luni.platform.OSFileSystem.open(OSFileSystem.java:235)
      at java.io.FileInputStream.<init>(FileInputStream.java:76)
      at org.apache.harmony.luni.internal.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:88)
      at org.apache.harmony.luni.internal.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:186)
      at java.net.URL.openStream(URL.java:671)
      at HarmonyFileLocalhost.main(HarmonyFileLocalhost.java:11)

      ============== HarmonyFileLocalhost.java ===============

      import java.io.File;
      import java.io.InputStream;
      import java.net.URL;

      public class HarmonyFileLocalhost {
      public static void main(String[] args) throws Exception

      { String basedir = "./HarmonyFileLocalhost.java"; basedir = new File(basedir).getAbsolutePath(); String urlString = "file://localhost/" + basedir; URL url = new URL(urlString); InputStream is = url.openStream(); int c; while ((c = is.read()) != -1) System.out.write(c); }

      }

      This is a stripped down test for a failure in Axis2's org.apache.axis2.jaxws.description.PartialWSDLTests test case.

      thanks,
      dims

      Attachments

        1. Harmony-5779.diff
          2 kB
          Sean Qiu
        2. harmony-5779-tim.diff
          2 kB
          Tim Ellison
        3. Harmony-5779-V3.diff
          5 kB
          Sean Qiu

        Activity

          People

            tellison Tim Ellison
            dims Davanum Srinivas
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: