Description
The same nullable enum properties get different default values depending on which mapper is invoked:
| Field |
ServiceMapper.ToDomain |
ServiceRepository.MapToDomain |
| StartupType |
Automatic (line 101) |
Manual (line 632) |
| RecoveryAction |
RestartService (line 114) |
None (line 645) |
Both methods map ServiceDto → domain Service, but code paths using the Mapper get Automatic/RestartService while code paths using the Repository get Manual/None.
This means a service's behavior can change depending on whether it was loaded via one mapper or the other when the DTO has null values.
Note: The StartupType inconsistency was tracked in #291 but the RecoveryAction default difference was not.
Severity
Warning — same data produces different behavior depending on code path.
Suggested fix
Align both mappers to use the same defaults, ideally defined as constants in AppConfig.
Description
The same nullable enum properties get different default values depending on which mapper is invoked:
Automatic(line 101)Manual(line 632)RestartService(line 114)None(line 645)Both methods map
ServiceDto→ domainService, but code paths using the Mapper getAutomatic/RestartServicewhile code paths using the Repository getManual/None.This means a service's behavior can change depending on whether it was loaded via one mapper or the other when the DTO has null values.
Note: The StartupType inconsistency was tracked in #291 but the RecoveryAction default difference was not.
Severity
Warning — same data produces different behavior depending on code path.
Suggested fix
Align both mappers to use the same defaults, ideally defined as constants in
AppConfig.