From b4b4765a09b6559384648dbf9c71914f21e05a05 Mon Sep 17 00:00:00 2001 From: Kyle Julian <38759683+kylejuliandev@users.noreply.github.com> Date: Fri, 4 Oct 2024 21:30:53 +0100 Subject: [PATCH] Address issue on older FTMs not resolving non nullable after check with string.IsNullOrEmpty Signed-off-by: Kyle Julian <38759683+kylejuliandev@users.noreply.github.com> --- src/OpenFeature/LoggingHook.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/OpenFeature/LoggingHook.cs b/src/OpenFeature/LoggingHook.cs index 528a6917..726944bc 100644 --- a/src/OpenFeature/LoggingHook.cs +++ b/src/OpenFeature/LoggingHook.cs @@ -139,10 +139,10 @@ internal class LoggingHookContent public LoggingHookContent(string? domain, string? providerName, string flagKey, string? defaultValue, EvaluationContext? evaluationContext = null) { - this._domain = string.IsNullOrEmpty(domain) ? "missing" : domain; - this._providerName = string.IsNullOrEmpty(providerName) ? "missing" : providerName; + this._domain = string.IsNullOrEmpty(domain) ? "missing" : domain!; + this._providerName = string.IsNullOrEmpty(providerName) ? "missing" : providerName!; this._flagKey = flagKey; - this._defaultValue = string.IsNullOrEmpty(defaultValue) ? "missing" : defaultValue; + this._defaultValue = string.IsNullOrEmpty(defaultValue) ? "missing" : defaultValue!; this._evaluationContext = evaluationContext; } @@ -153,19 +153,19 @@ public override string ToString() var stringBuilder = new StringBuilder(); stringBuilder.Append("Domain:"); - stringBuilder.Append(_domain); + stringBuilder.Append(this._domain); stringBuilder.Append(Environment.NewLine); stringBuilder.Append("ProviderName:"); - stringBuilder.Append(_providerName); + stringBuilder.Append(this._providerName); stringBuilder.Append(Environment.NewLine); stringBuilder.Append("FlagKey:"); - stringBuilder.Append(_flagKey); + stringBuilder.Append(this._flagKey); stringBuilder.Append(Environment.NewLine); stringBuilder.Append("DefaultValue:"); - stringBuilder.Append(_defaultValue); + stringBuilder.Append(this._defaultValue); stringBuilder.Append(Environment.NewLine); if (this._evaluationContext != null)