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

FileInputStream.available() does not throw IOException for closed stream (win32)

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.2beta4
    • CPU:
      x86, sparc
    • OS:
      solaris_2.5.1, windows_95
    • Verification:
      Not verified

      Description



      Name: mgC56079 Date: 04/16/98



      ---- Here is the test ----
      import java.io.FileInputStream;
      import java.io.IOException;

      public class FIS {

        public static void main(String args[]) {
          try {
            FileInputStream fis = new FileInputStream("FIS.java");
            fis.close();
            System.out.println(fis.available());
          }
          catch (IOException e) {
            e.printStackTrace();
          }
        }

      }
      ---- Output on Solaris (correct) ----
      % java FIS
      java.io.IOException
      at java.io.FileInputStream.available(Native Method)
      at FIS.main(FIS.java:10)
      ---- Output on Win95 (wrong) ----
      I:\bugs>java -Djava.compiler=NONE FIS
      Warning: JIT compiler "NONE" not found. Will use interpreter.
      7733632
      ----

      ======================================================================

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              zlisunw Zhenghua Li (Inactive)
              Reporter:
              mgorshen Mikhail Gorshenev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: