Commit ff921f6
Fix argument validation in RuntimeType.InvokeMember (#75006)
The rollout of `!!` erroneously moved an ArgumentNullException to be thrown earlier in the method, preventing a null name from being used (which is valid with BindingFlags.CreateInstance).
(Separately, we should consider fixing the nullable reference type annotation on `string name`, since null is allowed in some circumstances.)
Co-authored-by: Stephen Toub <stoub@microsoft.com>1 parent b617f4f commit ff921f6
File tree
2 files changed
+11
-3
lines changed- src/libraries
- System.Private.CoreLib/src/System
- System.Reflection/tests
2 files changed
+11
-3
lines changedLines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
459 | 459 | | |
460 | 460 | | |
461 | 461 | | |
462 | | - | |
463 | | - | |
464 | 462 | | |
465 | 463 | | |
466 | 464 | | |
| |||
567 | 565 | | |
568 | 566 | | |
569 | 567 | | |
| 568 | + | |
| 569 | + | |
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
573 | | - | |
| 573 | + | |
574 | 574 | | |
575 | 575 | | |
576 | 576 | | |
| |||
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
170 | 178 | | |
171 | 179 | | |
172 | 180 | | |
| |||
0 commit comments