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

Java: FileOutputStream("NUL:") not working in 8u331

    XMLWordPrintable

Details

    • b06
    • x86_64
    • windows

    Description

      ADDITIONAL SYSTEM INFORMATION :
      Windows Server 2019
      Oracle Java 8u331 (worked in 8u321)

      A DESCRIPTION OF THE PROBLEM :
      On Windows, NUL is the null output device similar to /dev/null on Linux.

      With Oracle Java 8 Update 331, trying to get a new FileOutputStream("NUL:") throws an exception. Previously (Java 8u321) it worked fine.

      The problem seems to be the colon:
      * new FileOutputStream("NUL") - OK
      * new FileOutputStream("NUL:") - exception


      REGRESSION : Last worked in version 8

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      try
      {
        new FileOutputStream("NUL:");
        System.out.println("OK");
      }
      catch (FileNotFoundException e)
      {
        System.out.println(e);
      }

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      "OK" output
      ACTUAL -
      java.io.FileNotFoundException: Invalid file path

      FREQUENCY : always


      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              webbuggrp Webbug Group
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: