Skip to content

Commit

Permalink
ObserverManager: Guard against null in constructor (#8358)
Browse files Browse the repository at this point in the history
* check logger for null

* Update src/Orleans.Core/Utils/ObserverManager.cs

* Update src/Orleans.Core/Utils/ObserverManager.cs

---------

Co-authored-by: Setup <[email protected]>
Co-authored-by: Reuben Bond <[email protected]>
  • Loading branch information
3 people authored Apr 3, 2023
1 parent 53d2ead commit f642de6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Orleans.Core/Utils/ObserverManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public class ObserverManager<TIdentity, TObserver> : IEnumerable<TObserver>
public ObserverManager(TimeSpan expiration, ILogger log)
{
ExpirationDuration = expiration;
_log = log;
_log = log ?? throw new ArgumentNullException(nameof(log));
GetDateTime = () => DateTime.UtcNow;
}

Expand Down

0 comments on commit f642de6

Please sign in to comment.