From 4ba8abd435e3d60e964a912c5ff6e0565d8a124a Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Thu, 10 Jul 2025 13:51:22 +1000 Subject: [PATCH] redundant null checks in TrxProcessLifetimeHandler --- .../TrxProcessLifetimeHandler.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxProcessLifetimeHandler.cs b/src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxProcessLifetimeHandler.cs index 6242fd4664..ae3a26358a 100644 --- a/src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxProcessLifetimeHandler.cs +++ b/src/Platform/Microsoft.Testing.Extensions.TrxReport/TrxProcessLifetimeHandler.cs @@ -236,7 +236,7 @@ public async ValueTask DisposeAsync() await DisposeHelper.DisposeAsync(_singleConnectionNamedPipeServer).ConfigureAwait(false); // Dispose the pipe descriptor after the server to ensure the pipe is closed. - _pipeNameDescription?.Dispose(); + _pipeNameDescription.Dispose(); } #else public void Dispose() @@ -244,7 +244,7 @@ public void Dispose() _singleConnectionNamedPipeServer?.Dispose(); // Dispose the pipe descriptor after the server to ensure the pipe is closed. - _pipeNameDescription?.Dispose(); + _pipeNameDescription.Dispose(); } #endif