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

Some File names with colon accepted on D: drive.................

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 1.4.0
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_nt

      Description



      Name: nt126004 Date: 02/28/2002


      FULL PRODUCT VERSION :
      java version "1.4.0"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-b92)
      Java HotSpot(TM) Client VM (build 1.4.0-b92, mixed mode)

      FULL OPERATING SYSTEM VERSION :NT 4.0,Service pack 3,build 1381


      EXTRA RELEVANT SYSTEM CONFIGURATION :
      All machines where this bug was reproducble had c:,d:e:
      drives only

      A DESCRIPTION OF THE PROBLEM :
      It seems if I create a file abcd:abcd on the D DRIVE(only)
      a 0 kb file is created with the name abcd

      If I try to create a file by the name abcd: or abcd?abcd on
      the D: drive, Then an exception is thrown(Expected
      behaviour)

      For all other restricted charecters (ie charecters that
      cannot be included in filenames) exception is thrown in
      both cases mentioned above(expected).

      The problem defined above happens IN CASE WE CREATE THE
      FILE IN THE D: DRIVE ONLY.

      But then there is a twist......
      This problem seems to happen only with machines that are
      partitioned as c:,d:,e:

      And this does not seem to be an an issue with the service
      pack as I was able to reproduce the same bug on two
      machines with service packs 3 and 6.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      try to create a file abcd:abcd with code below on your D:
      drive (donot create any subdirectories).run on the dos
      prompt
      file abcd is created ,0kb size

      try to create a file abcd?abcd ,exception is thrown at
      runtime




      EXPECTED VERSUS ACTUAL BEHAVIOR :
      no exception is thrown and 0kb file created in d; drive.
      change the file name to say abcd?abcd in the code above
      An exception is thrown at runtime (expected).
      Note:-Note this bug is reproducible on machines with hard
      drives c:,d:& e:

      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      create a java file with the following code on your D: drive (do not create any
      subdirectories).run on the dos prompt

      import java.io.*;
       public class Class1 extends Object {

        
        public Class1()
       {
        }

        public static void main(String[] args)
         {
            try
            {
            File outputFile = new File("abcd:ddd");
            Writer textWriter = new BufferedWriter(new FileWriter(outputFile));
            textWriter.write("Write Test");
            textWriter.close();
            }
            catch(Exception e)
            {
             e.printStackTrace();
            }
         }
      }


      ---------- END SOURCE ----------
      (Review ID: 139154)
      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              nthompsosunw Nathanael Thompson (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: