Throw ContainerNotFoundException from removeBlob

This makes removeBlob consistent with all other user-facing methods.
This commit is contained in:
Andrew Gaul 2014-08-21 16:18:12 -07:00
parent 80a4430035
commit 60e3763999
1 changed files with 3 additions and 0 deletions

View File

@ -229,6 +229,9 @@ public class LocalAsyncBlobStore extends BaseAsyncBlobStore {
*/
@Override
public ListenableFuture<Void> removeBlob(final String container, final String key) {
if (!storageStrategy.containerExists(container)) {
return Futures.immediateFailedFuture(cnfe(container));
}
storageStrategy.removeBlob(container, key);
return immediateFuture(null);
}