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

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

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0M14
    • Fix Version/s: 5.0M16
    • Component/s: Classlib
    • Labels:
      None
    • Environment:
      all
    • Patch Info:
      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

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

              Dates

              • Created:
                Updated:
                Resolved: