diff --git a/spotbugs-tests/src/test/java/edu/umd/cs/findbugs/detect/Issue2640Test.java b/spotbugs-tests/src/test/java/edu/umd/cs/findbugs/detect/Issue2640Test.java new file mode 100644 index 00000000000..e0c06824831 --- /dev/null +++ b/spotbugs-tests/src/test/java/edu/umd/cs/findbugs/detect/Issue2640Test.java @@ -0,0 +1,12 @@ +package edu.umd.cs.findbugs.detect; + +import edu.umd.cs.findbugs.AbstractIntegrationTest; +import org.junit.jupiter.api.Assertions; +import org.junit.jupiter.api.Test; + +class Issue2640Test extends AbstractIntegrationTest { + @Test + void testIssue() { + Assertions.assertDoesNotThrow(() -> performAnalysis("ghIssues/Issue2640.class")); + } +} diff --git a/spotbugsTestCases/src/java/ghIssues/Issue2640.java b/spotbugsTestCases/src/java/ghIssues/Issue2640.java new file mode 100644 index 00000000000..0a879f80f50 --- /dev/null +++ b/spotbugsTestCases/src/java/ghIssues/Issue2640.java @@ -0,0 +1,8 @@ +package ghIssues; + +public class Issue2640 { + public void testUnreachableCode() { + org.junit.Assert.fail(); + System.err.println("Not reachable code"); + } +}