Always return "isLatest=true" if versioning is disabled#2484
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR ensures that when versioning is disabled, the ListObjectVersions API always returns isLatest = true. It updates the factory method, adjusts the integration test to assert the new flag, and records the change in the changelog.
- ObjectVersion.from(S3Object) now unconditionally sets
isLatesttotrueand includes a brief JavaDoc. - Integration test
ListObjectVersionsITupdated to extract and assert the newisLatestproperty. CHANGELOG.mdupdated with the new 4.5.1 entry detailing the fix and dependency bumps.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| server/src/main/java/com/adobe/testing/s3mock/dto/ObjectVersion.java | Set isLatest=true in from(S3Object), adjusted formatting, added JavaDoc |
| integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/ListObjectVersionsIT.kt | Updated test to extract and assert isLatest alongside versionId |
| CHANGELOG.md | Added 4.5.1 release notes with feature/fix and dependency updates |
Comments suppressed due to low confidence (2)
server/src/main/java/com/adobe/testing/s3mock/dto/ObjectVersion.java:61
- [nitpick] Consider expanding the Javadoc for the from(S3Object) overload to include @param tags for each argument and explicitly note that
isLatestis always true when versioning is disabled.
/**
integration-tests/src/test/kotlin/com/adobe/testing/s3mock/its/ListObjectVersionsIT.kt:128
- [nitpick] Consider adding a focused unit test for
ObjectVersion.from(S3Object)to verify at the unit level thatisLatestis set to true when versioning is disabled, complementing this integration test.
assertThat(it.versions())
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.
Description
See subject.
Related Issue
Fixes #2481
Tasks