-
Notifications
You must be signed in to change notification settings - Fork 1
Consolidate all event classes into a single package by eliminating sub-packages. #1534
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR consolidates all event classes from sub-packages (e.g., callout, callback, face, fingerprint, subject, samples, upsync, downsync) into the single parent package com.simprints.infra.events.event.domain.models. Additionally, it refactors Event and EventPayload from abstract to sealed classes, improving type safety.
Changes:
- Moved all event classes from sub-packages into a single package, eliminating hierarchical package organization
- Refactored
EventandEventPayloadfrom abstract to sealed classes - Moved
BiometricDataSourcefromcalloutsub-package to root models package
Reviewed changes
Copilot reviewed 137 out of 137 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Event.kt | Changed from abstract to sealed class; made getTokenizableFields() open with default empty map; marked equals() and hashCode() as final |
| EventPayload.kt | Changed from abstract to sealed class |
| BiometricDataSource.kt | Moved from callout sub-package to models package; added trailing comma |
| Various event classes | Updated package declarations from sub-packages to root models package |
| All test and production files | Updated imports to reflect new package structure |
Comments suppressed due to low confidence (2)
infra/events/src/main/java/com/simprints/infra/events/event/domain/models/Event.kt:1
- Changing
getTokenizableFields()from abstract to open with a default empty map implementation may break existing implementations that override this method. While sealed classes ensure all implementations are known at compile-time, this changes the contract. Consider verifying all subclasses still provide meaningful implementations where needed, as some may now silently fall back to the empty map default.
infra/events/src/main/java/com/simprints/infra/events/event/domain/models/BiometricReference.kt:14 - The fully qualified references
BiometricReferenceType.Companion.FACE_REFERENCE_KEYare more verbose than necessary. Since the original code used direct imports, consider maintaining consistency by importing these constants directly instead of using fully qualified names.
| enum class BiometricDataSource { | ||
| SIMPRINTS, | ||
| COMMCARE, | ||
| ; |
Copilot
AI
Jan 15, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a trailing semicolon after the last enum value (COMMCARE) with no additional members is unnecessary. While syntactically valid in Kotlin, this deviates from Kotlin conventions where trailing semicolons are only needed when enum has additional members or functions.
|


JIRA ticket
Will be released in: 2026.1.0
Notable changes
EventandEventPayloadinto sealed classes.Testing guidance
Additional work checklist