KEMBAR78
docs: Update DeleteObject Sample to be clearer on object versioning behavior by sydney-munro · Pull Request #2595 · googleapis/java-storage · GitHub
Skip to content

Conversation

@sydney-munro
Copy link
Contributor

@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
Contributor 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
Contributor 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
Contributor 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
@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.

3 participants