Skip to content

Commit

Permalink
DaoAuthenticationProviderTests#avg returns fraction
Browse files Browse the repository at this point in the history
  • Loading branch information
Emkas committed Oct 28, 2021
1 parent 246df9f commit bab1c53
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -462,11 +462,7 @@ public void IGNOREtestSec2056() {
}

private double avg(List<Long> counts) {
long sum = 0;
for (Long time : counts) {
sum += time;
}
return sum / counts.size();
return counts.stream().mapToLong(Long::longValue).average().orElse(0);
}

@Test
Expand Down

0 comments on commit bab1c53

Please sign in to comment.