Skip to content
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

Merged
merged 7 commits into from
Jun 26, 2024

Conversation

sydney-munro
Copy link
Collaborator

@sydney-munro sydney-munro commented Jun 24, 2024

No description provided.

@product-auto-label product-auto-label bot added the size: s Pull request size is small. label Jun 24, 2024
@sydney-munro sydney-munro changed the title docs: Update DeleteObject Sample to be clearer on object versioning b… docs: Update DeleteObject Sample to be clearer on object versioning behavior Jun 24, 2024
@product-auto-label product-auto-label bot added the api: storage Issues related to the googleapis/java-storage API. label Jun 24, 2024
@gcf-owl-bot gcf-owl-bot bot requested review from a team as code owners June 24, 2024 19:44
@sydney-munro
Copy link
Collaborator Author

/gcbrun

Copy link
Collaborator

@BenWhitehead BenWhitehead left a 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


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
Copy link
Contributor

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"?

Copy link
Collaborator Author

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();
Copy link
Contributor

@JesseLovelace JesseLovelace Jun 26, 2024

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"

Copy link
Collaborator Author

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?

@sydney-munro sydney-munro merged commit 79b7cf0 into main Jun 26, 2024
20 of 22 checks passed
@sydney-munro sydney-munro deleted the fix-delete-sample branch June 26, 2024 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: storage Issues related to the googleapis/java-storage API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants