HADOOP-15827. NPE in DynamoDBMetadataStore.lambda$listChildren for root + auth S3Guard.

Contributed by Gabor Bota
This commit is contained in:
Steve Loughran 2018-10-09 10:46:41 +01:00
parent d4626b4d18
commit 7ba1cfdea7
No known key found for this signature in database
GPG Key ID: D22CF846DBB162A0

View File

@ -630,7 +630,7 @@ public DirListingMetadata listChildren(final Path path) throws IOException {
LOG.trace("Listing table {} in region {} for {} returning {}",
tableName, region, path, metas);
return (metas.isEmpty() && dirPathMeta == null)
return (metas.isEmpty() || dirPathMeta == null)
? null
: new DirListingMetadata(path, metas, isAuthoritative,
dirPathMeta.getLastUpdated());