We should document that behavior on Directory.getContents() -- this might be the only case in the codebase where it's possible for both args to be non-null at once, so it's fairly non-obvious that it's even possible (let alone what it means when at happens).