Repository navigation
fix(storage): encode null IpFilter network sources as JSON null - #15267
Open
nidhiii-27 wants to merge 1 commit into
Open
nidhiii-27 wants to merge 1 commit into
nidhiii-27 wants to merge 1 commit into
Conversation
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]
Contributor
There was a problem hiding this comment.
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.
This branch has not been deployed
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.
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.