Repository navigation
Fix NRE in ActionPreference parameters - #11779
Ilya (iSazonov) wants to merge 1 commit into
Conversation
Paul Higinbotham (PaulHigin)
left a comment
There was a problem hiding this comment.
This looks right to me. I can't think of any negative consequences in making this change, since it currently throws NRE.
edf1f50 to
6abd5c4
Compare
|
I think the right fix should be in the parameter binding code, where the |
|
Dongbo Wang (@daxian-dbw) My initial thoughts was the same. But after I look the binding code I think the code is too sensitive (we can break something) and the simple fix is more reliable. The code is in ReflectionParameterBinder() Can we safely replace |
|
The fix should be doing the same as in here:
|
|
Dongbo Wang (@daxian-dbw) #12124 returns better error message so I close current PR. |
PR Summary
Fix #11692
Add ValidateNotNull attribute to ErrorAction, WarningAction and InformationAction common parameters.
PR Context
PR Checklist
.h,.cpp,.cs,.ps1and.psm1files have the correct copyright headerWIP:or[ WIP ]to the beginning of the title (theWIPbot will keep its status check atPendingwhile the prefix is present) and remove the prefix when the PR is ready.