#1250 OS_OPEN_STREAM not detected

3.x
closed-rejected
5
2017-10-23
2014-02-06
Olivier J.
No

In the following code, OS_OPEN_STREAM_EXCEPTION_PATH is not detected :

  public static void dumb(OutputStream out) throws Exception { 
    out.write(1);
  }

  public static void bad3() throws Exception {
    OutputStream os = new FileOutputStream(new File("/dev/null")); // Expecting OS here
    dumb(os);
    os.flush();
    os.close();
  }
1 Attachments

Discussion

  • Olivier J.

    Olivier J. - 2014-02-06

    Attach capture of missing detection in findbugs 2.0.3 for Eclipse

     
  • William Pugh

    William Pugh - 2014-02-06
    • labels: --> false negative
    • status: open --> open-accepted
    • assigned_to: William Pugh
    • Group: 2.0.3 --> 3.0.0
     
  • Andrey Loskutov

    Andrey Loskutov - 2014-06-19
    • Group: 3.0.0 --> 3.0.1
     
  • Andrey Loskutov

    Andrey Loskutov - 2017-10-22
    • Status: open-accepted --> closed-rejected
     

Log in to post a comment.