Use is not null instead of != null in new files from PR #10353 - #10362
Merged
Conversation
Fixes #10361 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: ed3dfd9e-f272-4b5a-b0fe-243680d50305
Contributor
There was a problem hiding this comment.
Pull request overview
Aligns null checks with the Platform codebase’s established is not null convention. No behavioral changes.
Changes:
- Replaces nine
!= nullchecks with pattern matching. - Preserves existing serialization and MSBuild behavior.
Show a summary per file
| File | Description |
|---|---|
MSBuildConsumer.cs |
Updates four lifecycle callback null checks. |
SerializerUtilities.TestNodeSerializers.cs |
Updates five exception null checks. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Balanced
Contributor
There was a problem hiding this comment.
Expert Review — PR #10362
Verdict: No issues found.
This is a straightforward, mechanical style fix replacing != null with is not null in two files introduced by PR #10353, aligning them with the repo convention enforced by .editorconfig and the coding guidelines.
All 8 replacements are correct pattern-matching substitutions with identical semantics (no custom operator != overloads are involved — these are reference-type/nullable checks). No behavioral change, no public API surface change, no new dependencies.
Nothing to flag across any review dimension — clean change. ✅
Evangelink
enabled auto-merge (squash)
July 31, 2026 14:44
0101
approved these changes
Jul 31, 2026
Evangelink
pushed a commit
that referenced
this pull request
Jul 31, 2026
Two more consumers whose state machines my change disturbed, both the same shape as the hang-dump fix: a retry sequence has one in-progress update for the whole test but a terminal update per attempt, so completing on a superseded attempt drops the test while its next attempt is still running. - `SimplifiedConsoleOutputDeviceBase` completed `_activeTestTracker` before the superseded gate, so active-test progress stopped after attempt 1. The comment there also asserted the opposite of what actually happens - "each attempt has its own in-progress/terminal pair" - which is wrong: MSTest reports in-progress once per test, outside the retry loop. Corrected both. - `SlowTestReporterBase` removed the uid from `_inProgress` on every terminal update, so a retried test stopped producing slow-test diagnostics after its first attempt. This is a shared base, so the Azure DevOps and GitHub slow-test reporters inherited the behavior. Also merges main (#10362). Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: fa37ea7e-23a2-458b-bb8a-68ad56c832e6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #10361
Replaces
!= nullwithis not nullin the two files introduced by #10353, aligning them with the repo convention used everywhere else in the Platform codebase.src/Platform/Microsoft.Testing.Extensions.MSBuild/MSBuildConsumer.cs— 4 occurrences (ApplicationStateGuard.Ensure(...))src/Platform/Microsoft.Testing.Platform/ServerMode/JsonRpc/SerializerUtilities.TestNodeSerializers.cs— 5 occurrencesStyle-only change; no behavior difference. Verified both projects build with 0 warnings / 0 errors.