FindBugs (eclipse plugin v3.0.1) reports a redundant null check on the closing brace of the following try-with-resources statement:
public void falsePositive() {
try (X x = new X(); X y = new X()) {
throw new IllegalStateException();
} // Redundant nullcheck of x, which is known to be non-null in test.Bug1169.falsePositive()
}
private static class X implements AutoCloseable {
@Override
public void close() {
}
}
The finding seems to be reported when more than one AutoClosable is used and the try block ends with a thrown exception.
FindBugs (eclipse plugin v3.0.1) reports a redundant null check on the closing brace of the following try-with-resources statement:
The finding seems to be reported when more than one AutoClosable is used and the try block ends with a thrown exception.