MCPcopy Create free account
hub / github.com/spotbugs/spotbugs / testFail5

Method testFail5

spotbugsTestCases/src/java/RECTest.java:89–98  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

87
88 // should fail -- catches E, but E not thrown
89 public void testFail5() {
90 try {
91 for (int i = 0; i < 1000; i++)
92 for (int j = i; j < 1000; j++)
93 throwsNothing();
94 staticThrowsIOException();
95 } catch (Exception e) {
96 dontTriggerEmptyExceptionHandler();
97 }
98 }
99
100 // should fail -- try catch could throw either of two exceptions, catches E,
101 // but E not thrown

Callers

nothing calls this directly

Calls 3

throwsNothingMethod · 0.95

Tested by

no test coverage detected