diff --git a/src/main/java/edu/hm/hafner/analysis/registry/SpotBugsDescriptor.java b/src/main/java/edu/hm/hafner/analysis/registry/SpotBugsDescriptor.java index 87f41e50b..e150954ca 100644 --- a/src/main/java/edu/hm/hafner/analysis/registry/SpotBugsDescriptor.java +++ b/src/main/java/edu/hm/hafner/analysis/registry/SpotBugsDescriptor.java @@ -1,7 +1,5 @@ package edu.hm.hafner.analysis.registry; -import edu.hm.hafner.analysis.Report.IssueType; - /** * A descriptor for SpotBugs. * @@ -29,9 +27,4 @@ public String getUrl() { public String getIconUrl() { return "https://raw.githubusercontent.com/spotbugs/spotbugs.github.io/master/images/logos/spotbugs_icon_only_zoom_256px.png"; } - - @Override - public IssueType getType() { - return IssueType.BUG; - } } diff --git a/src/test/java/edu/hm/hafner/analysis/ModuleDetectorTest.java b/src/test/java/edu/hm/hafner/analysis/ModuleDetectorTest.java index ab16f615d..b1b1cc3ec 100644 --- a/src/test/java/edu/hm/hafner/analysis/ModuleDetectorTest.java +++ b/src/test/java/edu/hm/hafner/analysis/ModuleDetectorTest.java @@ -43,7 +43,7 @@ void shouldIdentifyModuleIfThereAreMoreEntries() { var ant = PATH_PREFIX_ANT + AntModuleDetector.ANT_PROJECT; var maven = PATH_PREFIX_MAVEN + MavenModuleDetector.MAVEN_POM; when(stub.find(any(), anyString())).thenReturn(new String[]{ant, maven}); - when(stub.open(PREFIX + ant)).thenReturn(read(AntModuleDetector.ANT_PROJECT)); + when(stub.open(PREFIX + ant)).thenAnswer(fileName -> read(AntModuleDetector.ANT_PROJECT)); when(stub.open(PREFIX + maven)).thenAnswer(filename -> read(MavenModuleDetector.MAVEN_POM)); }); @@ -84,7 +84,7 @@ void shouldEnsureThatOsgiHasPrecedenceOverMavenAndAnt() { private void verifyOrder(final String prefix, final String ant, final String maven, final String[] foundFiles) { var factory = createFileSystemStub(stub -> { when(stub.find(any(), anyString())).thenReturn(foundFiles); - when(stub.open(ant)).thenReturn(read(AntModuleDetector.ANT_PROJECT)); + when(stub.open(ant)).thenAnswer(fileName -> read(AntModuleDetector.ANT_PROJECT)); when(stub.open(maven)).thenAnswer(filename -> read(MavenModuleDetector.MAVEN_POM)); });