-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix the possible nullref on completing failed results #10513
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.
I don't see how this fixes the null ref, can you elaborate on that please?
Sure! Happy to clear that out! I'll use one example (out of 5 usages) of unification of completing submission with exception: Formerly: msbuild/src/Build/BackEnd/BuildManager/BuildManager.cs Lines 818 to 834 in a481b83
After refactor: msbuild/src/Build/BackEnd/BuildManager/BuildManager.cs Lines 807 to 817 in 1b1df9e
The code within
The 2nd option is least risky as it's the smallest codechange plus reflects 1:1 the behavior before refactoring (where the condition checked explicitly the |
Fixes AB#2172446
Context
The OM unification (#10172) unified check for readiness of BuildSubmission - it newly skipped checking of
BuiltRequest
not being null - expecting that during submitting the submission theBuiltResult
is eventaully set.This was covering the happy path, however result created from exception might be requested too early - before
BuiltRequest
is attached (but afetIsStarted
was set). So we reintroduced the nun-null checkChanges Made
The removed
BuiltRequest
null check was reintroduced - it was just pulled to the internals of theBuildSubmission
type.