Skip to content

Commit e0821f2

Browse files
Emkasjzheaux
authored andcommitted
DaoAuthenticationProviderTests#avg returns fraction
1 parent b77cb8d commit e0821f2

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

core/src/test/java/org/springframework/security/authentication/dao/DaoAuthenticationProviderTests.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -462,11 +462,7 @@ public void IGNOREtestSec2056() {
462462
}
463463

464464
private double avg(List<Long> counts) {
465-
long sum = 0;
466-
for (Long time : counts) {
467-
sum += time;
468-
}
469-
return sum / counts.size();
465+
return counts.stream().mapToLong(Long::longValue).average().orElse(0);
470466
}
471467

472468
@Test

0 commit comments

Comments
 (0)