-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Evolve null-checking approach #19233
Labels
area-global
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
punted-for-5.0
type-enhancement
Milestone
Comments
Is it planned to replace null attributes with nullable reference types in 5.0 milestone? |
@davidroth See #14150 |
ajcvickers
added a commit
that referenced
this issue
Oct 25, 2021
Part of #19233 Removes a lot of null checks from code that is not intended to be called directly by application code.
ajcvickers
added a commit
that referenced
this issue
Oct 28, 2021
Part of #19233 Removes a lot of null checks from code that is not intended to be called directly by application code.
ajcvickers
added a commit
that referenced
this issue
Oct 28, 2021
Part of #19233 Quite aggressive, based on not expected to be called by application code.
ajcvickers
added a commit
that referenced
this issue
Nov 2, 2021
Part of #19233 Quite aggressive, based on not expected to be called by application code.
ajcvickers
added a commit
that referenced
this issue
Nov 2, 2021
ajcvickers
added a commit
that referenced
this issue
Nov 2, 2021
ajcvickers
added a commit
that referenced
this issue
Nov 4, 2021
ajcvickers
added a commit
that referenced
this issue
Nov 4, 2021
ajcvickers
added a commit
that referenced
this issue
Nov 4, 2021
ajcvickers
added a commit
that referenced
this issue
Nov 5, 2021
ajcvickers
added
the
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
label
Nov 18, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area-global
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
punted-for-5.0
type-enhancement
As discussed with the team last week:
In EF6 we had explicit checks for null arguments in all public and internal members, compiling out the checks on internal members for release builds.
In EF Core we stopped doing the checks on internal members. This did not significantly impact our ability to understand the code or debug issues.
Currently, we check for null arguments on an "public" API. "Public" means any member that can be called from code outside of the EF assemblies and isn't marked as "internal". So, members implementing a member of public interface is public. Likewise, protected members are public surface because classes outside of EF can override and call these methods.
However, consider that:
Given all this, we discussed changing the default approach for null argument checking:
The text was updated successfully, but these errors were encountered: