DaoAuthenticationProviderTests#avg returns fraction
This commit is contained in:
parent
b77cb8d0cb
commit
e0821f2a99
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue