Skip to content

chore: [ANDROSDK-2332] migrate maintenance domain models to Kotlin#2647

Merged
taridepaco merged 4 commits into
developfrom
ANDROSDK-2332
Jun 26, 2026
Merged

chore: [ANDROSDK-2332] migrate maintenance domain models to Kotlin#2647
taridepaco merged 4 commits into
developfrom
ANDROSDK-2332

Conversation

@taridepaco

@taridepaco taridepaco commented Jun 26, 2026

Copy link
Copy Markdown
Collaborator

Migrates the maintenance domain models ForeignKeyViolation and D2Error from Java AutoValue classes to Kotlin data classes built with the @ModelBuilder KSP annotation. Java-style accessor methods, the builder()/toBuilder() API and D2Error.isOffline are all preserved, so existing call sites and the public API surface are unchanged.

D2Error exposed two limitations in the @ModelBuilder processor that are also fixed here: typealiased field types (it extends Exception) were rendered as [typealias Exception] and produced uncompilable builders, and computed properties (such as the derived isOffline) were being treated as builder fields. The processor now renders typealiases correctly and only treats primary-constructor parameters as model fields. The two conditional defaults from the old D2Error.build() (errorCode and created) move into the builder() factory.

Related task: ANDROSDK-2332

@sonarqubecloud

Copy link
Copy Markdown

@taridepaco taridepaco merged commit bf7e19f into develop Jun 26, 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