DaoAuthenticationProviderTests#avg returns fraction

This commit is contained in:
Emil Sierżęga 2021-10-20 01:02:36 +02:00 committed by Josh Cummings
parent b77cb8d0cb
commit e0821f2a99
1 changed files with 1 additions and 5 deletions

View File

@ -462,11 +462,7 @@ public class DaoAuthenticationProviderTests {
} }
private double avg(List<Long> counts) { private double avg(List<Long> counts) {
long sum = 0; return counts.stream().mapToLong(Long::longValue).average().orElse(0);
for (Long time : counts) {
sum += time;
}
return sum / counts.size();
} }
@Test @Test