chore: [ANDROSDK-2341] tidy up code after model migration - #2701
Merged
Conversation
|
vgarciabnz
approved these changes
Aug 21, 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.



Cleans up leftovers from the migration of the Java models to Kotlin data classes. Guard clauses in the DTO mappers are normalized so that a single nullable check uses
?.letinstead of anif/else nullblock, and every non-null assertion that the compiler proves redundant is removed across main, unit test and instrumented test sources. Removing an assertion or a safe call changes the type of the surrounding expression, so the pass was repeated until no warnings were left; the dead code this exposed (pointlessletwrappers, unreachable elvis branches and a redundant== true) is cleaned up as well. A fewvardeclarations that are never reassigned, also inherited from the Java conversion, becomeval.Assertions that are still needed are untouched, and there is no behavior change: all of these are no-ops the compiler already optimizes away. Note that
apiCheckcurrently fails ondevelopas well, unrelated to this branch, because the Koin compiler plugin emitsorg.koin.plugin.hints.*classes that are missing from the committed API dump; that drift is left for a separate ticket rather than folded in here.Related task: ANDROSDK-2341