Rule: CS8619 (nullability of reference types doesn't match target type) — MAJOR, 4 production sites.
RabbitMQ.Client's BasicProperties.Headers is typed IDictionary<string, object?>?, but four publishers initialize it with new Dictionary<string, object>() (non-nullable value), producing CS8619. The canonical siblings already use object? (NotificationEventPublisher, ScheduledTaskPublisher, RabbitMQRetryHelper).
Sites (all new Dictionary<string, object> → new Dictionary<string, object?>):
SpikerSoft.Common/Telemetry/ActivityHelper.cs:134 — the shared InjectTraceContext trace-header allocator
SpikerSoft.EventHandlers.CalendarReminders/Services/CalendarReminderHostedService.cs:276 (Sonar-flagged; introduced by #670's Headers-init NRE fix)
Zero behavior change — nullability is compile-time metadata only; the two forms produce identical IL. All values written are non-null (Encoding.UTF8.GetBytes(...) / boxed int). Purely corrects the annotation to match the target type and clears 4 MAJOR warnings.
**Rule:** CS8619 (nullability of reference types doesn't match target type) — MAJOR, 4 production sites.
RabbitMQ.Client's `BasicProperties.Headers` is typed `IDictionary<string, object?>?`, but four publishers initialize it with `new Dictionary<string, object>()` (non-nullable value), producing CS8619. The canonical siblings already use `object?` (`NotificationEventPublisher`, `ScheduledTaskPublisher`, `RabbitMQRetryHelper`).
Sites (all `new Dictionary<string, object>` → `new Dictionary<string, object?>`):
- `SpikerSoft.Common/Telemetry/ActivityHelper.cs:134` — the shared `InjectTraceContext` trace-header allocator
- `SpikerSoft.Business/Domain/Calendar/Services/CalendarNotificationService.cs:105`
- `SpikerSoft.EventHandlers.QuizGeneration/Services/QuizGenerationWorkerService.cs:839`
- `SpikerSoft.EventHandlers.CalendarReminders/Services/CalendarReminderHostedService.cs:276` (Sonar-flagged; introduced by #670's Headers-init NRE fix)
**Zero behavior change** — nullability is compile-time metadata only; the two forms produce identical IL. All values written are non-null (`Encoding.UTF8.GetBytes(...)` / boxed int). Purely corrects the annotation to match the target type and clears 4 MAJOR warnings.
Resolved in spikersoft-backend PR #392 (merged to master, merge a921ad7c). All four CS8619 sites corrected to Dictionary<string, object?> — annotation-only, zero behavior change. Post-merge master CI green. Closing.
Resolved in spikersoft-backend PR #392 (merged to master, merge a921ad7c). All four CS8619 sites corrected to Dictionary<string, object?> — annotation-only, zero behavior change. Post-merge master CI green. Closing.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Rule: CS8619 (nullability of reference types doesn't match target type) — MAJOR, 4 production sites.
RabbitMQ.Client's
BasicProperties.Headersis typedIDictionary<string, object?>?, but four publishers initialize it withnew Dictionary<string, object>()(non-nullable value), producing CS8619. The canonical siblings already useobject?(NotificationEventPublisher,ScheduledTaskPublisher,RabbitMQRetryHelper).Sites (all
new Dictionary<string, object>→new Dictionary<string, object?>):SpikerSoft.Common/Telemetry/ActivityHelper.cs:134— the sharedInjectTraceContexttrace-header allocatorSpikerSoft.Business/Domain/Calendar/Services/CalendarNotificationService.cs:105SpikerSoft.EventHandlers.QuizGeneration/Services/QuizGenerationWorkerService.cs:839SpikerSoft.EventHandlers.CalendarReminders/Services/CalendarReminderHostedService.cs:276(Sonar-flagged; introduced by #670's Headers-init NRE fix)Zero behavior change — nullability is compile-time metadata only; the two forms produce identical IL. All values written are non-null (
Encoding.UTF8.GetBytes(...)/ boxed int). Purely corrects the annotation to match the target type and clears 4 MAJOR warnings.Resolved in spikersoft-backend PR #392 (merged to master, merge a921ad7c). All four CS8619 sites corrected to Dictionary<string, object?> — annotation-only, zero behavior change. Post-merge master CI green. Closing.