Skip to content

Commit

Permalink
Fix Storage Blob Sample issues Azure#18202 (Azure#21890)
Browse files Browse the repository at this point in the history
Fix Storage Blob Sample issues Azure#18202
  • Loading branch information
v-hongli1 authored Jul 21, 2021
1 parent 24569a7 commit 6cc3f70
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import java.nio.charset.StandardCharsets;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.util.Base64;
import java.util.Collections;
import java.util.Locale;
import java.util.Map;
Expand Down Expand Up @@ -85,8 +84,7 @@ public static void main(String[] args) throws IOException, NoSuchAlgorithmExcept
/*
* Send an MD5 hash of the content to be validated by the service.
*/
byte[] md5 = Base64.getEncoder().encode(MessageDigest.getInstance("MD5")
.digest(data.getBytes(StandardCharsets.UTF_8)));
byte[] md5 = MessageDigest.getInstance("MD5").digest(data.getBytes(StandardCharsets.UTF_8));

/*
* Data which will upload to block blob.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ public void createWithResponse2() {
Map<String, String> metadata = Collections.singletonMap("metadata", "value");
Map<String, String> tags = Collections.singletonMap("tags", "value");
BlobRequestConditions requestConditions = new BlobRequestConditions()
.setLeaseId(leaseId)
.setIfUnmodifiedSince(OffsetDateTime.now().minusDays(3));
Context context = new Context("key", "value");

Expand Down

0 comments on commit 6cc3f70

Please sign in to comment.