-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Use extension everything to polyfill ArgumentNullException.ThrowIfNull #114644
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 564 out of 564 changed files in this pull request and generated no comments.
Comments suppressed due to low confidence (2)
src/coreclr/nativeaot/System.Private.CoreLib/src/System/Runtime/InteropServices/Marshal.NativeAot.cs:92
- ArgumentNullException.ThrowIfNull is being applied to an IntPtr (a value type), which will never be null. If the intent is to validate that 'ptr' is not equal to IntPtr.Zero, consider an explicit check for that condition.
ArgumentNullException.ThrowIfNull(ptr);
src/libraries/Common/src/System/ExceptionPolyfills.cs:12
- [nitpick] Consider adding unit tests to verify the behavior of the new polyfill implementation for ThrowIfNull to ensure it correctly handles various argument types.
extension(ArgumentNullException)
Tagging subscribers to this area: @dotnet/area-meta |
a7627fb
to
ab4a4c2
Compare
ab4a4c2
to
9e4fb47
Compare
9e4fb47
to
f2f02cb
Compare
f2f02cb
to
91cf1f1
Compare
91cf1f1
to
e414ed8
Compare
cc: @jaredpar, @jcouv, @ericstj