From f642de6c7636ffa9fadf9e944dae44232f274c26 Mon Sep 17 00:00:00 2001 From: Brady Gaster <41929050+bradygaster@users.noreply.github.com> Date: Mon, 3 Apr 2023 08:51:49 -0700 Subject: [PATCH] ObserverManager: Guard against `null` in constructor (#8358) * check logger for null * Update src/Orleans.Core/Utils/ObserverManager.cs * Update src/Orleans.Core/Utils/ObserverManager.cs --------- Co-authored-by: Setup Co-authored-by: Reuben Bond <203839+ReubenBond@users.noreply.github.com> --- src/Orleans.Core/Utils/ObserverManager.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Orleans.Core/Utils/ObserverManager.cs b/src/Orleans.Core/Utils/ObserverManager.cs index efd737b85f..9c24b2f027 100644 --- a/src/Orleans.Core/Utils/ObserverManager.cs +++ b/src/Orleans.Core/Utils/ObserverManager.cs @@ -59,7 +59,7 @@ public class ObserverManager : IEnumerable public ObserverManager(TimeSpan expiration, ILogger log) { ExpirationDuration = expiration; - _log = log; + _log = log ?? throw new ArgumentNullException(nameof(log)); GetDateTime = () => DateTime.UtcNow; }