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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make RV_DONT_JUST_NULL_CHECK_READLINE can detect MemoryCacheImageOutputStream #1818

Closed
Zustin opened this issue Nov 17, 2021 · 1 comment
Closed

Comments

@Zustin
Copy link
Contributor

Zustin commented Nov 17, 2021

Hi 馃槂 I find a false negative about the rule RV_DONT_JUST_NULL_CHECK_READLINE. Please refer to the below code sample.

SpotBugs should have reported a violation at line 3, but it does not. Hence, I think this is a false negative. Thanks for your consideration.

public void foo(OutputStream stream) throws IOException {
    MemoryCacheImageOutputStream os = new MemoryCacheImageOutputStream(stream);
    while(os.readLine() != null) {}
}

MySpotBugs version is 4.4.2 and I run it by Idea plugin and CLI.

@gtoison
Copy link
Contributor

gtoison commented Sep 6, 2023

This was fixed in #1823

@gtoison gtoison closed this as completed Sep 6, 2023
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

2 participants