Skip to content

Commit 1a4d4b8

Browse files
committed
refactor: remove obvious comments from CosmosDiagnosticsContext
Removed verbose explanations for: - Null-conditional operator behavior (self-explanatory) - Activity.Dispose() idempotency (common .NET knowledge) The code remains functionally identical.
1 parent 376a99b commit 1a4d4b8

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

Microsoft.Azure.Cosmos.Encryption.Custom/src/Common/CosmosDiagnosticsContext.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,8 @@ public void Dispose()
181181

182182
long elapsedTicks = Stopwatch.GetTimestamp() - this.startTicks;
183183

184-
// Defensive null check - should never be null if enabled=true,
185-
// but guards against struct manipulation bugs
186184
this.owner?.Record(this.name, this.startTicks, elapsedTicks);
187185

188-
// Activity.Dispose() is idempotent per .NET framework documentation,
189-
// so multiple calls are safe (though not the intended usage pattern).
190-
// Null-conditional ensures we skip disposal if activity was never created.
191186
this.activity?.Dispose();
192187
}
193188
}

0 commit comments

Comments
 (0)