Skip to content

Drop the useless null cast in OpenUrzednikValidationExceptionTest #182

Closed

Description

@milten89

Follow-up from #159 (PR #181), where CodeQL flagged cs/useless-upcast on a cast of null in a test.

Problem

tests/OpenUrzednik.Core.Tests/Exceptions/OpenUrzednikValidationExceptionTest.cs:55 casts null! to IReadOnlyList<ValidationError>. OpenUrzednikValidationException has only one single-argument constructor, so the cast isn't needed. CodeQL hasn't flagged it, but it's the same pattern.

The other casts of null in the tests are needed: they are extension-method receivers or pick between the two BindAsync overloads.

Scope

  • Drop the cast.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:coreAffects OpenUrzednik.Coreskip-changelogExclude from release notes

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions