Closed
Description
The following:
bucket.create("file", new byte[0], "text/plain");
Blob blob = bucket.get("file");
bucket.storage().create(blob, new byte[0], BlobTargetOption.generationNotMatch());
Causes a:
com.google.gcloud.storage.StorageException: java.lang.NullPointerException
at com.google.gcloud.storage.StorageException.translateAndThrow(StorageException.java:74)
at com.google.gcloud.storage.StorageImpl.create(StorageImpl.java:150)
at com.google.gcloud.storage.StorageImpl.create(StorageImpl.java:129)
...
The translateAndThrow()
call suppresses the underlying stack trace, but this shouldn't trigger an NPE. I do expect it to fail, but it should fail with a meaningful error message.
Metadata
Assignees
Labels
No labels