diff --git a/modules/dcache-webdav/src/main/java/org/dcache/webdav/DcacheDirectoryResource.java b/modules/dcache-webdav/src/main/java/org/dcache/webdav/DcacheDirectoryResource.java index 939cb5136ff..8ff2c591e94 100644 --- a/modules/dcache-webdav/src/main/java/org/dcache/webdav/DcacheDirectoryResource.java +++ b/modules/dcache-webdav/src/main/java/org/dcache/webdav/DcacheDirectoryResource.java @@ -101,15 +101,13 @@ public List getChildren() { // Theoretically, we should throw NotAuthorizedException here. The // problem is that Milton reacts badly to this, and aborts the whole // PROPFIND request, even if the affected directory is not the primary - // one. Milton accepts a null response as equivalent to - // Collections.emptyList() - return null; + // one. + return Collections.emptyList(); } catch (CacheException | InterruptedException e) { // We currently have no way to indicate a temporary failure for this // directory and throwing any kind of exception will abort the whole - // PROPFIND request; therefore, we return null. Milton accepts a - // null response as equivalent to Collections.emptyList() - return null; + // PROPFIND request; therefore, we return an empty list. + return Collections.emptyList(); } }