Skip to content

Commit

Permalink
only require reason if finding not fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
nahsra authored Apr 1, 2024
1 parent 659b766 commit f218baf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/io/codemodder/codetf/DetectorFinding.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public DetectorFinding(
this.id = Objects.requireNonNull(id);
this.fixed = fixed;
this.reason = Optional.ofNullable(reason);
if (fixed && this.reason.isEmpty()) {
if (!fixed && this.reason.isEmpty()) {
throw new IllegalArgumentException("Fixed findings must have a reason");
}
}
Expand Down

0 comments on commit f218baf

Please sign in to comment.