Skip to content

Commit

Permalink
Fix SpotBugs warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Oct 5, 2024
1 parent 0e17398 commit 136a2bf
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import edu.hm.hafner.analysis.Report;
import edu.hm.hafner.analysis.Severity;
import edu.hm.hafner.analysis.registry.ParserDescriptor.Option;
import edu.hm.hafner.analysis.registry.ParserDescriptor.Type;
import edu.hm.hafner.util.ResourceTest;

import static edu.hm.hafner.analysis.assertions.Assertions.*;
Expand Down Expand Up @@ -61,8 +60,8 @@ void shouldFindSomeParsers() {
var parserRegistry = new ParserRegistry();

assertThat(parserRegistry).hasIds(SPOTBUGS, CHECKSTYLE, PMD).hasNames("SpotBugs", "CheckStyle", "PMD");
assertThat(parserRegistry.get(SPOTBUGS)).hasId(SPOTBUGS).hasName("SpotBugs").hasType(Type.BUG);
assertThat(parserRegistry.get("owasp-dependency-check")).hasName("OWASP Dependency Check").hasType(Type.VULNERABILITY);
assertThat(parserRegistry.get(SPOTBUGS)).hasId(SPOTBUGS).hasName("SpotBugs").hasType(ParserDescriptor.Type.BUG);
assertThat(parserRegistry.get("owasp-dependency-check")).hasName("OWASP Dependency Check").hasType(ParserDescriptor.Type.VULNERABILITY);
assertThat(parserRegistry.contains(SPOTBUGS)).isTrue();
assertThat(parserRegistry.contains("nothing")).isFalse();
List<ParserDescriptor> descriptors = parserRegistry.getAllDescriptors();
Expand All @@ -74,7 +73,7 @@ void shouldFindSomeParsers() {
void shouldConfigureCpdParser() {
var parserRegistry = new ParserRegistry();
var cpdDescriptor = parserRegistry.get("cpd");
assertThat(cpdDescriptor).hasType(Type.DUPLICATION).hasName("CPD");
assertThat(cpdDescriptor).hasType(ParserDescriptor.Type.DUPLICATION).hasName("CPD");

IssueParser parser = cpdDescriptor.createParser();

Expand Down

0 comments on commit 136a2bf

Please sign in to comment.