refactor stream

This commit is contained in:
Loredana Crusoveanu 2018-02-13 23:00:49 +02:00
parent ff242a01ae
commit 5842c877f3
1 changed files with 1 additions and 3 deletions

View File

@ -46,9 +46,7 @@ public class ClientErrorLoggingFilter extends GenericFilterBean {
logger.debug("User " + auth.getName() + " encountered error " + status); logger.debug("User " + auth.getName() + " encountered error " + status);
} else { } else {
if (errorCodes.stream() if (errorCodes.stream()
.filter(s -> s.value() == status) .anyMatch(s -> s.value() == status)) {
.findFirst()
.isPresent()) {
logger.debug("User " + auth.getName() + " encountered error " + status); logger.debug("User " + auth.getName() + " encountered error " + status);
} }
} }