Skip to content

Commit

Permalink
fix for issue #385
Browse files Browse the repository at this point in the history
  • Loading branch information
UmmulkiramR committed Nov 22, 2023
1 parent 1597035 commit 88d71d6
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
import java.net.URISyntaxException;
import java.util.Base64;
import java.util.List;
import java.util.Objects;

import static com.google.common.base.Preconditions.checkArgument;

Expand Down Expand Up @@ -101,7 +102,12 @@ public ObjectSpecification download(String objectId, long offset, long length, b
}
fillPartUrls(objectId, parts);

val md5 = base64ToHexMD5(blob.getProperties().getContentMD5());
String contentMd5 = blob.getProperties().getContentMD5();
String md5 = null;
if(Objects.nonNull(contentMd5)) {
md5 = base64ToHexMD5(contentMd5);
}

return new ObjectSpecification(objectId, objectId, objectId, parts, rangeLength, md5, false);
} catch (StorageException e) {
log.error("Failed to download objectId: {}, offset: {}, length: {}, forExternalUse: {}: {} ",
Expand Down

0 comments on commit 88d71d6

Please sign in to comment.