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

[classlib][luni] Can't load classes with file://// and URL class

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 5.0M14
    • 5.0M15
    • Classlib
    • None

    Description

      Run below test case,

      import java.net.MalformedURLException;
      import java.net.URL;

      public class Test {

      public static void main(String args[]) throws MalformedURLException

      { URL url1 = new URL("file:////home/test.jar"); System.out.println("getAuthority:" + url1.getAuthority()); System.out.println("getFile:" + url1.getFile()); }

      }

      The output of harmony is:
      getAuthority:
      getFile://home/test.jar

      while the output of Sun RI is:
      getAuthority:null
      getFile:////home/test.jar

      Attachments

        1. Harmony-6573.diff
          2 kB
          Xiao Shu

        Activity

          People

            regis_xu Regis Xu
            xiaoshu Xiao Shu
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: