Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8249190

File-Constructor returns without Slash

    Details

    • Subcomponent:
    • Introduced In Build:
      b01
    • Introduced In Version:
      11
    • CPU:
      x86_64
    • OS:
      windows_10

      Description

      ADDITIONAL SYSTEM INFORMATION :
      Windows 7 / OpenJDK 11.02

      A DESCRIPTION OF THE PROBLEM :
      If you do something like this, in earlier Version in return C:\IPC now it Returns C:IPC
      File f = new File ("C:", "IPC");
      String path =f.getPath();

      The Problem occurs in Java.io.WinNtFilesystem in the resolve method on line 239:

              boolean isDirectoryRelative =
                  pn == 2 && isLetter(parent.charAt(0)) && parent.charAt(1) == ':';



      REGRESSION : Last worked in version 8u192

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      File f = new File ("C:", "IPC");
      String path =f.getPath();

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      path = C:\IPC
      ACTUAL -
      path = C:IPC

      FREQUENCY : always

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                bpb Brian Burkhalter
                Reporter:
                tongwan Andrew Wang
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: