Skip to content

Commit ac8af2e

Browse files
committed
Disabled detector ThrowingExceptions by default (fixes spotbugs#2040)
This avoids many false positives reported via spotbugs#2040
1 parent 68e7dca commit ac8af2e

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ Currently the versioning policy of this project follows [Semantic Versioning v2.
77
## Unreleased - 2022-??-??
88
### Fixed
99
- Fixed False positives for `RCN_REDUNDANT_NULLCHECK_OF_NONNULL_VALUE` on try-with-resources with interface references ([#1931](https://github.com/spotbugs/spotbugs/issues/1931))
10+
- Disabled detector `ThrowingExceptions` by default to avoid many false positives ([#2040](https://github.com/spotbugs/spotbugs/issues/2040))
1011

1112
## 4.7.0 - 2022-04-14
1213
### Changed

spotbugs-tests/src/test/java/edu/umd/cs/findbugs/detect/CheckThrowingExceptions.java

+2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@
44
import static org.hamcrest.Matchers.hasItem;
55
import static org.hamcrest.MatcherAssert.assertThat;
66

7+
import org.junit.Ignore;
78
import org.junit.Test;
89

910
import edu.umd.cs.findbugs.AbstractIntegrationTest;
1011
import edu.umd.cs.findbugs.test.matcher.BugInstanceMatcher;
1112
import edu.umd.cs.findbugs.test.matcher.BugInstanceMatcherBuilder;
1213

1314
public class CheckThrowingExceptions extends AbstractIntegrationTest {
15+
@Ignore("Detector disabled, see issue #2040")
1416
@Test
1517
public void throwingExceptionsTests() {
1618
performAnalysis("MethodsThrowingExceptions.class");

spotbugs/etc/findbugs.xml

+1-1
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@
663663
reports="SSD_DO_NOT_USE_INSTANCE_LOCK_ON_SHARED_STATIC_DATA"/>
664664
<Detector class="edu.umd.cs.findbugs.detect.DontUseFloatsAsLoopCounters" speed="fast"
665665
reports="FL_FLOATS_AS_LOOP_COUNTERS"/>
666-
<Detector class="edu.umd.cs.findbugs.detect.ThrowingExceptions" speed="fast"
666+
<Detector class="edu.umd.cs.findbugs.detect.ThrowingExceptions" speed="fast" disabled="true"
667667
reports="THROWS_METHOD_THROWS_RUNTIMEEXCEPTION,THROWS_METHOD_THROWS_CLAUSE_BASIC_EXCEPTION,THROWS_METHOD_THROWS_CLAUSE_THROWABLE" />
668668
<Detector class="edu.umd.cs.findbugs.detect.PermissionsSuper"
669669
reports="PERM_SUPER_NOT_CALLED_IN_GETPERMISSIONS"/>

0 commit comments

Comments
 (0)