Skip to content

Conversation

@hendriklhf
Copy link

EqualityComparer<T>.Default.Equals(val) calls the standard bool object.Equals(object? obj) overload, so checks if EqualityComparer<T>.Default and val are equal, which is not what is intended here. All other pre-constructor null checks are therefore redundant, so I removed them.

@HofmeisterAn HofmeisterAn changed the title Fix null check and remove redundant null checks chore: Remove redundant null check covered by JsonRequestContent Sep 9, 2025
@HofmeisterAn HofmeisterAn added the enhancement New feature or request label Sep 9, 2025
Copy link
Collaborator

@HofmeisterAn HofmeisterAn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

@HofmeisterAn HofmeisterAn merged commit f06216c into testcontainers:main Sep 9, 2025
2 checks passed
@hendriklhf hendriklhf deleted the argnullexcept branch September 9, 2025 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants