A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/2977 below:

false positive with reassignment detection · Issue #2977 · pmd/pmd · GitHub

Rule: CloseResource

Upgraded to 6.30.0, having previously been using 6.28.0. Now seeing false positives with the CloseResource rule, with this contrived example:

import java.io.RandomAccessFile;

public class FalsePositive {
    private boolean isHundredBytes = false;

    public void bar() throws Exception {
        RandomAccessFile file = null;
        try {
            file = new RandomAccessFile("name", "r");
            this.isHundredBytes = file.length() == 100;  /* violation here... */
        } finally {
            file.close();
        }
    }
}

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4