docs: Update DeleteObject Sample to be clearer on object versioning behavior#2595
Merged
sydney-munro merged 7 commits intomainfrom Jun 26, 2024
Merged
docs: Update DeleteObject Sample to be clearer on object versioning behavior#2595sydney-munro merged 7 commits intomainfrom
sydney-munro merged 7 commits intomainfrom
Conversation
Contributor
Author
|
/gcbrun |
samples/snippets/src/main/java/com/example/storage/object/DeleteObject.java
Outdated
Show resolved
Hide resolved
…teObject.java Co-authored-by: BenWhitehead <BenWhitehead@users.noreply.github.com>
BenWhitehead
approved these changes
Jun 25, 2024
Collaborator
BenWhitehead
left a comment
There was a problem hiding this comment.
LGTM, getting another person to read over it would be good
samples/snippets/src/main/java/com/example/storage/object/DeleteObject.java
Show resolved
Hide resolved
|
|
||
| System.out.println("Object " + objectName + " was deleted from " + bucketName); | ||
| BlobId idWithGeneration = blob.getBlobId(); | ||
| // Deletes the blob specified by its id. When the generation is present and non-null it will be |
Contributor
There was a problem hiding this comment.
I think "when the generation is present" is a little vague, maybe we should specify as "When the generation is present in the BlobId object"?
Contributor
Author
There was a problem hiding this comment.
rephrased the comments. let me know if that is clearer.
JesseLovelace
approved these changes
Jun 26, 2024
| storage.delete(bucketName, objectName, precondition); | ||
|
|
||
| System.out.println("Object " + objectName + " was deleted from " + bucketName); | ||
| BlobId idWithGeneration = blob.getBlobId(); |
Contributor
There was a problem hiding this comment.
maybe add a comment on this line like "// The BlobId object has the Generation specified"
Contributor
Author
There was a problem hiding this comment.
i think the variable name is clear on this, no?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.