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

[classlib][luni] FileInputStream doesn't close FD in native code

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.0M14
    • 5.0M16
    • Classlib
    • None
    • all
    • Patch Available

    Description

      FileInputStream fileIn = new FileInputStream(new File("c:/test.txt"));
      FileInputStream fileIn2 = new FileInputStream(fileIn.getFD());
      fileIn2.close();
      fileIn.read();
      This piece of code will throw IOException with RI but can pass with Harmony.

      FileInputStream in = new FileInputStream(FileDescriptor.in);
      in.close();
      in = new FileInputStream(FileDescriptor.in);
      in.read();
      This piece of code also will throw IOException with RI but can pass with Harmony.

      Attachments

        1. HARMONY-6642.diff
          9 kB
          Shi Jun Zhang

        Activity

          People

            tellison Tim Ellison
            zhangshj Shi Jun Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: