Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@afranken
Copy link
Member

Description

See subject.

Related Issue

Fixes #2481

Tasks

  • I have signed the CLA.
  • I have written tests and verified that they fail without my change.

@afranken afranken self-assigned this Jun 27, 2025
@afranken afranken added the bug label Jun 27, 2025
@afranken afranken requested a review from Copilot June 27, 2025 11:13
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 isLatest to true and includes a brief JavaDoc.
  • Integration test ListObjectVersionsIT updated to extract and assert the new isLatest property.
  • CHANGELOG.md updated 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 isLatest is 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 that isLatest is set to true when versioning is disabled, complementing this integration test.
      assertThat(it.versions())

@afranken afranken merged commit 73cdc8a into main Jun 27, 2025
6 checks passed
@afranken afranken deleted the 2481-islatest-true-by-default branch June 27, 2025 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ListObjectVersions IsLatest param not working

2 participants