The non-concurrent (serialized) code path in RootCollection getLocalInodes throw a null pointer exception on directories without read permissions.
The concurrent code path compares the result of File.list() to null to check for errors. The non-concurrent (serialized) code path does not check the return value, instead it calls File.exists() on the returned object.
File.list() returns an empty array when the directory is empty, and null on errors. Use the same logic in the non-concurrent code path, so the behaviour of the two code paths are the same.
The non-concurrent (serialized) code path in RootCollection getLocalInodes throw a null pointer exception on directories without read permissions.
The concurrent code path compares the result of File.list() to null to check for errors. The non-concurrent (serialized) code path does not check the return value, instead it calls File.exists() on the returned object.
File.list() returns an empty array when the directory is empty, and null on errors. Use the same logic in the non-concurrent code path, so the behaviour of the two code paths are the same.