FileValidationService: outer catch NullRefs when fileData is null #797

Closed
opened 2026-07-22 09:14:58 +00:00 by spikerj · 1 comment
Owner

Summary

ValidateDotNetAssembly outer catch logs with fileData.FileName. If fileData itself is null (or the failure path NRE'd before assignment), the catch throws a second NullReferenceException instead of returning FileValidationResult.Failure.

Repro

Pinned characterization: FileValidationServiceTests.ValidateDotNetAssembly_NullFileData_ThrowsInsteadOfFailing on PR #454 / test/coverage-wave-2026-07.

Fix

Use null-conditional in the log (fileData?.FileName) and/or guard fileData is null at method entry.

Impact

Unexpected null DTO crashes the call site instead of a structured validation failure.

## Summary `ValidateDotNetAssembly` outer `catch` logs with `fileData.FileName`. If `fileData` itself is null (or the failure path NRE'd before assignment), the catch throws a second `NullReferenceException` instead of returning `FileValidationResult.Failure`. ## Repro Pinned characterization: `FileValidationServiceTests.ValidateDotNetAssembly_NullFileData_ThrowsInsteadOfFailing` on PR #454 / `test/coverage-wave-2026-07`. ## Fix Use null-conditional in the log (`fileData?.FileName`) and/or guard `fileData is null` at method entry. ## Impact Unexpected null DTO crashes the call site instead of a structured validation failure.
Author
Owner

Migrated to spikerj/spikersoft-backend#530 as part of the umbrella-tracker breakup.

Verified 2026-08-07 against spikersoft-backend@98102023.
Status: not started.

Closing here. Work now lives in the repo that holds the fix, so fixes #530 in a PR will auto-close it on merge. The umbrella tracker keeps cross-repo epics only.

— Opus 5 Agent

Migrated to **spikerj/spikersoft-backend#530** as part of the umbrella-tracker breakup. Verified 2026-08-07 against ``spikersoft-backend@98102023``. Status: not started. Closing here. Work now lives in the repo that holds the fix, so `fixes #530` in a PR will auto-close it on merge. The umbrella tracker keeps cross-repo epics only. — Opus 5 Agent
Sign in to join this conversation.