Avoid NPE in BaseBlobStore.copyBlob

Resolves copyBlob failures in Atmos.
This commit is contained in:
Andrew Gaul 2016-05-12 12:47:53 -07:00
parent 41bdd9c5a9
commit cd50ad905d
1 changed files with 2 additions and 1 deletions

View File

@ -263,8 +263,9 @@ public abstract class BaseBlobStore implements BlobStore {
throw new KeyNotFoundException(fromContainer, fromName, "while copying");
}
String eTag = maybeQuoteETag(blob.getMetadata().getETag());
String eTag = blob.getMetadata().getETag();
if (eTag != null) {
eTag = maybeQuoteETag(eTag);
if (options.ifMatch() != null && !options.ifMatch().equals(eTag)) {
throw returnResponseException(412);
}