Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add nullable attributes/parameter checks for query #19119

Merged

Conversation

ajcvickers
Copy link
Contributor

Fixes #16705

Attempted to add null checks when the API is a public-surface API, but not for purely internal APIs.

There may be some mistakes here; I plan to do a bit more static analysis after the initial merge.

Also fixed the ApiConsistencyTest to check pubternal types again (not sure why this was removed) and to check protected constructors.

@ajcvickers ajcvickers force-pushed the WhoDecidesWhetherItsNotOrNullOrNullOrNotOrNull1128 branch from d47ab37 to f30f7f5 Compare December 2, 2019 00:30
@smitpatel
Copy link
Contributor

    public virtual void SetStoreGeneratedValue(IProperty property, object value)

Align with SetTemporaryValue


Refers to: src/EFCore/ChangeTracking/Internal/InternalEntityEntry.cs:602 in f30f7f5. [](commit_id = f30f7f5, deletion_comment = False)

Copy link
Contributor

@smitpatel smitpatel left a comment

Choose a reason for hiding this comment

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

:shipit:

@smitpatel
Copy link
Contributor

I believe, we can correct anything later if erroneous.

Copy link
Member

@AndriySvyryd AndriySvyryd left a comment

Choose a reason for hiding this comment

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

:shipit:

Fixes #16705

Attempted to add null checks when the API is a public-surface API, but not for purely internal APIs.

There may be some mistakes here; I plan to do a bit more static analysis after the initial merge.

Also fixed the ApiConsistencyTest to check pubternal types again (not sure why this was removed) and to check protected constructors.
@ajcvickers ajcvickers force-pushed the WhoDecidesWhetherItsNotOrNullOrNullOrNotOrNull1128 branch from f30f7f5 to 78b0a11 Compare December 8, 2019 19:15
@ajcvickers ajcvickers merged commit 9abd61d into master Dec 8, 2019
@ajcvickers ajcvickers deleted the WhoDecidesWhetherItsNotOrNullOrNullOrNotOrNull1128 branch December 8, 2019 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add NotNull attributes to query code
3 participants