Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OS_OPEN_STREAM_EXCEPTION_PATH not detected #469

Open
OlivierJaquemet opened this issue Oct 23, 2017 · 0 comments
Open

OS_OPEN_STREAM_EXCEPTION_PATH not detected #469

OlivierJaquemet opened this issue Oct 23, 2017 · 0 comments

Comments

@OlivierJaquemet
Copy link

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();
  }

Initially reported at : https://sourceforge.net/p/findbugs/bugs/1250/
Verified with SpotBugs Eclipse Plugin 3.1.0.20170640-1497060633070

eclipse_2017-10-23_09-32-59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant