diff --git a/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/pool/XrootdPoolRequestHandler.java b/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/pool/XrootdPoolRequestHandler.java index 7c1ffad6648..0d166a930e7 100644 --- a/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/pool/XrootdPoolRequestHandler.java +++ b/modules/dcache-xrootd/src/main/java/org/dcache/xrootd/pool/XrootdPoolRequestHandler.java @@ -18,7 +18,6 @@ package org.dcache.xrootd.pool; import static java.nio.charset.StandardCharsets.US_ASCII; -import static java.util.function.Predicate.not; import static org.dcache.xrootd.protocol.XrootdProtocol.UUID_PREFIX; import static org.dcache.xrootd.protocol.XrootdProtocol.kXR_ArgInvalid; import static org.dcache.xrootd.protocol.XrootdProtocol.kXR_ArgMissing; @@ -52,6 +51,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.UUID; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; @@ -946,7 +946,7 @@ private FileDescriptor getDescriptorAtomically(int fd) throws XrootdException { @GuardedBy("writeLock") private void removeAllDescriptorsAtomically() { - _descriptors.stream().filter(not(null)).forEach(FileDescriptor::close); + _descriptors.stream().filter(Objects::nonNull).forEach(FileDescriptor::close); _descriptors.clear(); }