Skip to content

Commit

Permalink
Fix warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Mar 11, 2024
1 parent 110fd92 commit 8ca13fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/edu/hm/hafner/grading/CoverageScore.java
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,9 @@ public CoverageScore build() {
"You must either specify a coverage report or provide a list of sub-scores.");

if (scores.isEmpty() && report != null && metric != null) {
return new CoverageScore(getId(), getName(), getConfiguration(), report, metric);
return new CoverageScore(getId(), getName(), getConfiguration(),
Objects.requireNonNull(report),
Objects.requireNonNull(metric));
}
else {
return new CoverageScore(getId(), getName(), getConfiguration(), scores);
Expand Down

0 comments on commit 8ca13fb

Please sign in to comment.