HADOOP-15876. Use keySet().removeAll() to remove multiple keys from Map in AzureBlobFileSystemStore

Contributed by Da Zhou.
This commit is contained in:
Da Zhou 2018-11-13 21:46:18 +00:00 committed by Steve Loughran
parent fcbd205cc3
commit a13be203b7
No known key found for this signature in database
GPG Key ID: D22CF846DBB162A0

View File

@ -678,9 +678,7 @@ public void removeDefaultAcl(final Path path) throws AzureBlobFileSystemExceptio
}
}
for (Map.Entry<String, String> defaultAclEntry : defaultAclEntries.entrySet()) {
aclEntries.remove(defaultAclEntry.getKey());
}
aclEntries.keySet().removeAll(defaultAclEntries.keySet());
client.setAcl(AbfsHttpConstants.FORWARD_SLASH + getRelativePath(path, true),
AbfsAclHelper.serializeAclSpec(aclEntries), eTag);