Skip to content

chore: [ANDROSDK-2341] tidy up code after model migration - #2701

Merged
taridepaco merged 2 commits into
developfrom
ANDROSDK-2341
Aug 21, 2026
Merged

chore: [ANDROSDK-2341] tidy up code after model migration#2701
taridepaco merged 2 commits into
developfrom
ANDROSDK-2341

Conversation

@taridepaco

@taridepaco taridepaco commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

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 ?.let instead of an if/else null block, 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 (pointless let wrappers, unreachable elvis branches and a redundant == true) is cleaned up as well. A few var declarations that are never reassigned, also inherited from the Java conversion, become val.

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 apiCheck currently fails on develop as well, unrelated to this branch, because the Koin compiler plugin emits org.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

@sonarqubecloud

Copy link
Copy Markdown

@taridepaco
taridepaco merged commit e2b2f15 into develop Aug 21, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants