-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Update DeleteObject Sample to be clearer on object versioning behavior #2595
Conversation
/gcbrun |
samples/snippets/src/main/java/com/example/storage/object/DeleteObject.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rephrased the comments. let me know if that is clearer.
storage.delete(bucketName, objectName, precondition); | ||
|
||
System.out.println("Object " + objectName + " was deleted from " + bucketName); | ||
BlobId idWithGeneration = blob.getBlobId(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe add a comment on this line like "// The BlobId object has the Generation specified"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think the variable name is clear on this, no?
No description provided.