Merge #7138#7139
Open
alextwoods wants to merge 1 commit into
Open
Conversation
Amazon S3 event notifications delivered to SNS, SQS, and Lambda now
include an `awsGeneratedTags` map on the `bucket` object when system
tags are enabled on the source bucket. The Java SDK model did not
round-trip this field, so consumers had to fall back to raw JSON
parsing to read the tags.
This change adds `Map<String, String> awsGeneratedTags` to `S3Bucket`
and threads it through the reader and writer:
* `S3Bucket`: adds `awsGeneratedTags` field with a getter, a new
four-argument constructor, and updates `equals`/`hashCode`/
`toString`. The pre-existing three-argument constructor is
preserved so existing callers are source- and behavior-compatible.
Tags are defensively copied on construction and returned as an
unmodifiable view.
* `DefaultS3EventNotificationReader`: parses `awsGeneratedTags` as
`Map<String, String>`. Absent field yields `null`. Null value
entries are preserved. Non-string values throw
`IllegalArgumentException` with a helpful message including the
offending key and value.
* `DefaultS3EventNotificationWriter`: emits `awsGeneratedTags` only
when the map is non-null and non-empty, matching S3's server-side
`@JsonInclude(NON_EMPTY)` behavior so round-tripped output is
indistinguishable from what S3 emits.
Also bumps `eventVersion` fixtures in the module test files from
`2.4` to `2.5` to reflect the schema version emitted alongside this
launch.
The change is fully additive:
* Older SDKs remain compatible with new payloads (unknown fields
are ignored during parse).
* Newer SDKs remain compatible with old payloads
(`getAwsGeneratedTags()` returns `null` when the field is absent).
2765ca7 to
0b1c256
Compare
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.
Merge PR #7138
(Run CI on changes from fork repo)