Skip to content

Query operator handles null but no nullable in method siguature resulting in warnings #8807

@tstojecki

Description

@tstojecki

Any reason why these are not nullable types? The operator methods (.And() and .Or()) seem to be handling null args so it appears that nulls are allowed?

https://github.com/elastic/elasticsearch-net/blob/de0517da98ac751d15b8ea02fc901c4cbca0b0f0/src/Elastic.Clients.Elasticsearch/_Shared/Types/QueryDsl/Query.cs#L17C33-L17C39

Without this using Nullable results in a compile time warning unless pragma is used
# pragma warning disable CS8604

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions