Skip to content

fix(storage): encode null IpFilter network sources as JSON null - #15267

Open
nidhiii-27 wants to merge 1 commit into
mainfrom
fix/storage-ip-filter-json-null-encoding
Open

nidhiii-27 wants to merge 1 commit into
mainfrom
fix/storage-ip-filter-json-null-encoding

Conversation

@nidhiii-27

Copy link
Copy Markdown
Contributor

JsonConversions now encodes null publicNetworkSource and vpcNetworkSources fields on BucketInfo.IpFilter using Data.nullOf(...) so their JSON representation uses explicit null values consistent with other nullable BucketInfo fields, and ipFilterDecode guards those fields with !Data.isNull(...) during decoding. Non-null network sources and other IpFilter attributes remain unchanged. Added a unit test in BucketInfoTest covering null IpFilter network source encoding and round-trip decoding.

JsonConversions now encodes null publicNetworkSource and vpcNetworkSources fields on BucketInfo.IpFilter using Data.nullOf(...) so their JSON representation uses explicit null values consistent with other nullable BucketInfo fields, and ipFilterDecode guards those fields with !Data.isNull(...) during decoding. Non-null network sources and other IpFilter attributes remain unchanged. Added a unit test in BucketInfoTest covering null IpFilter network source encoding and round-trip decoding.

[Generated-by: AI]
@nidhiii-27 nidhiii-27 added the ai-generated Pull Request generated by AI label Nov 27, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request updates JsonConversions.java to explicitly handle null values for publicNetworkSource and vpcNetworkSources during the encoding and decoding of IpFilter configurations, ensuring they are correctly serialized as JSON nulls. A corresponding unit test has been added to BucketInfoTest.java to verify this behavior. The review feedback correctly identifies compilation errors in both the encoding and decoding methods due to the unqualified use of the nested class VpcNetworkSources, which should be fully qualified as Bucket.IpFilter.VpcNetworkSources.

@nidhiii-27
nidhiii-27 marked this pull request as ready for review November 27, 2026 12:21
@nidhiii-27
nidhiii-27 requested review from a team as code owners November 27, 2026 12:21
@nidhiii-27
nidhiii-27 requested a review from Dhriti07 November 27, 2026 12:21

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-generated Pull Request generated by AI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants