chore: [ANDROSDK-2327] filter out category option mappings without filter#2642
Merged
Conversation
Make CategoryOptionMappingDTO.filter nullable and drop option mappings without a filter when mapping to domain, so deserialization no longer fails on incoming objects that lack the (logically required) filter.
vgarciabnz
reviewed
Jun 17, 2026
| .categoryMapping(categoryMappingId) | ||
| .optionId(optionId) | ||
| .filter(filter) | ||
| .filter(filter!!) |
Member
There was a problem hiding this comment.
This double !! is a bit scary, although the list is filtered out in the other class and shouldn't be a problem. Couldn't we return a null if filter is not defined, and then use the mapNotNull() in the other class? I mean, just to avoid the !!.
vgarciabnz
approved these changes
Jun 25, 2026
|
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.



Category option mappings are expected to always carry a filter, but some objects arrive from the server without one. Since the field was non-nullable, deserialization failed on those objects. This makes
CategoryOptionMappingDTO.filternullable and drops the option mappings without a filter when mapping a category mapping to its domain model, so the program download no longer fails on these entries.A
program.jsontest case with an option mapping lacking a filter was added to verify it is excluded after deserialization andtoDomain.Related task: ANDROSDK-2327