Skip to content

Drop the useless null cast in OpenUrzednikValidationExceptionTest - #183

Merged
milten89 merged 2 commits into
developfrom
chore/drop-useless-null-cast
Oct 30, 2026
Merged

milten89 merged 2 commits into
developfrom
chore/drop-useless-null-cast

Conversation

@milten89

Copy link
Copy Markdown
Owner

Closes #182

Drops the cast of null! to IReadOnlyList<ValidationError> in Ctor_NullErrors_ThrowsArgumentNullException: OpenUrzednikValidationException has one single-argument constructor, so the cast isn't needed. Same pattern as CodeQL's cs/useless-upcast alert in #181. Test-only change.

Checks

  • dotnet build tests/OpenUrzednik.Core.Tests: 0 errors
  • Core tests -f net10.0 and -f net472: 164 pass each
  • dotnet format --verify-no-changes: clean

🤖 Generated with Claude Code

The exception has one single-argument constructor, so null! needs no
cast (the CodeQL cs/useless-upcast pattern fixed in #181).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@milten89 milten89 added the skip-changelog Exclude from release notes label Oct 30, 2026
@milten89
milten89 merged commit b7ce79c into develop Oct 30, 2026
10 checks passed
@milten89
milten89 deleted the chore/drop-useless-null-cast branch October 30, 2026 18:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Exclude from release notes

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Drop the useless null cast in OpenUrzednikValidationExceptionTest

1 participant