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

A false negative about the rule RV_DONT_JUST_NULL_CHECK_READLINE #1820

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

A false negative about the rule RV_DONT_JUST_NULL_CHECK_READLINE #1820

Zustin opened this issue Nov 17, 2021 · 1 comment

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 and I am willing to help fix this issue.

public void foo(InputStream stream) throws IOException {
    MemoryCacheImageInputStream is = new MemoryCacheImageInputStream(stream);
    while(is.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