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

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.0M14
    • Fix Version/s: 5.0M15
    • Component/s: Classlib
    • Labels:
      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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: