This is an automated email from the ASF dual-hosted git repository.

gaul pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jclouds.git


The following commit(s) were added to refs/heads/master by this push:
     new 45adfd679b JCLOUDS-1646: Use boxed Long in GCS
45adfd679b is described below

commit 45adfd679b66b2f065116abed88952fed9f41131
Author: Andrew Gaul <[email protected]>
AuthorDate: Wed Feb 12 21:18:09 2025 -0800

    JCLOUDS-1646: Use boxed Long in GCS
    
    Previously some objects lacked a content-length so this threw a
    NullPointerException when unboxing.
---
 .../googlecloudstorage/blobstore/GoogleCloudStorageBlobStore.java       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/providers/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/blobstore/GoogleCloudStorageBlobStore.java
 
b/providers/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/blobstore/GoogleCloudStorageBlobStore.java
index d053581f32..b3e44f82ce 100644
--- 
a/providers/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/blobstore/GoogleCloudStorageBlobStore.java
+++ 
b/providers/google-cloud-storage/src/main/java/org/jclouds/googlecloudstorage/blobstore/GoogleCloudStorageBlobStore.java
@@ -251,7 +251,7 @@ public final class GoogleCloudStorageBlobStore extends 
BaseBlobStore {
       MutableBlobMetadata metadata = objectToBlobMetadata.apply(gcsObject);
       Blob blob = new BlobImpl(metadata);
       Payload payload = api.getObjectApi().download(container, 
Strings2.urlEncode(name), httpOptions).getPayload();
-      long contentLength = payload.getContentMetadata().getContentLength();
+      Long contentLength = payload.getContentMetadata().getContentLength();
       payload.setContentMetadata(metadata.getContentMetadata()); // Doing this 
first retains it on setPayload.
       blob.setPayload(payload);
       // getObject() returns the full object length but download() could be 
smaller due to range requests.

Reply via email to