Skip to content

Commit

Permalink
PMD fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Krystian Panek committed May 13, 2020
1 parent 8586b1e commit b310cad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import org.slf4j.LoggerFactory;

import java.util.*;
import java.util.stream.Collectors;
import java.util.stream.Stream;

@Component(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ public String mappingsPercent() {
}

private String formatPercent(int value, int total) {
double percent = 0.0;
double percent;
if (total > 0) {
percent = ((double) value) / ((double) total);
} else {
percent = 0.0;
}
return NumberFormat.getPercentInstance(Locale.US).format(percent);
}
Expand Down

0 comments on commit b310cad

Please sign in to comment.