Skip to content

Commit

Permalink
Fix PMD warnings.
Browse files Browse the repository at this point in the history
  • Loading branch information
uhafner committed Oct 5, 2024
1 parent 82ebe9c commit a8676cb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/java/edu/hm/hafner/grading/AnalysisScore.java
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ protected String createSummary() {
}
else {
var warnings = format("%d %s", getTotalSize(), getItemCount(getTotalSize()));
var details = Severity.getPredefinedValues()
var details = getPredefinedValues()
.stream()
.map(this::reportSeverity)
.flatMap(Optional::stream)
Expand Down Expand Up @@ -180,7 +180,10 @@ private String getItemName() {
}

static String plural(final int score) {
return score != 1 ? "s" : "";
if (score == 1) {
return StringUtils.EMPTY;
}
return "s";
}

@Override @Generated
Expand Down

0 comments on commit a8676cb

Please sign in to comment.