Modify the enumeration judgment usage (#6518)

This commit is contained in:
Harry 2021-03-09 13:11:58 +08:00 committed by GitHub
parent 1a7cc805af
commit d61a4ef6ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@ public class BrowserLogQueryService implements Service {
final Pagination paging) throws IOException {
PaginationUtils.Page page = PaginationUtils.INSTANCE.exchange(paging);
BrowserErrorCategory errorCategory = Optional.ofNullable(category)
.filter(c -> !c.equals(ErrorCategory.ALL)) // ErrorCategory.All stands for query all.
.filter(c -> c != ErrorCategory.ALL) // ErrorCategory.All stands for query all.
.map(c -> BrowserErrorCategory.valueOf(c.name()))
.orElse(null);