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