Skip to content

Commit 7c9e824

Browse files
committed
Requestbody change
1 parent c7f641d commit 7c9e824

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

google-cloud-storage/src/main/java/com/google/cloud/storage/MultipartUploadClientImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ public UploadPartResponse uploadPart(UploadPartRequest request, RequestBody requ
169169
"?partNumber=" + request.partNumber() + "&uploadId=" + encode(request.uploadId());
170170
String uri = GCS_ENDPOINT + resourcePath + queryString;
171171
String contentType = "application/octet-stream";
172-
String contentMd5 = requestBody.getContent().getMd5();
172+
String content = requestBody.getContent().getMd5();
173173
String crc32cString = requestBody.getContent().getCrc32c();
174174
Map<String, String> extensionHeaders = getGenericExtensionHeader();
175175
extensionHeaders.put("x-goog-hash", "crc32c=" + crc32cString + ",md5=" + contentMd5);

google-cloud-storage/src/main/java/com/google/cloud/storage/RequestBody.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,6 @@ public static RequestBody of(ByteBuffer... buffers) {
4444
return new RequestBody(RewindableContent.of(buffers));
4545
}
4646

47-
public static RequestBody fromByteBuffer(ByteBuffer buffer) {
48-
ByteBuffer duplicate = buffer.duplicate();
49-
byte[] arr = new byte[duplicate.remaining()];
50-
duplicate.get(arr);
51-
return new RequestBody(RewindableContent.of(buffer));
52-
}
53-
5447
public static RequestBody of(ByteBuffer[] srcs, int srcsOffset, int srcsLength) {
5548
return new RequestBody(RewindableContent.of(srcs, srcsOffset, srcsLength));
5649
}

0 commit comments

Comments
 (0)