From 43e06e8e3eeb4032fba4087742a8695eb3a9ca3a Mon Sep 17 00:00:00 2001 From: Oleg <18466855+EvaTheSalmon@users.noreply.github.com> Date: Fri, 5 Jun 2026 14:33:47 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20=D1=83=D1=81=D1=82=D1=80=D0=B0=D0=BD?= =?UTF-8?q?=D0=B8=D1=82=D1=8C=20CS8604=20=D0=BD=D0=B0=20=D0=BF=D1=83=D1=82?= =?UTF-8?q?=D0=B8=20=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D1=83=D1=80=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D0=B8=20MbeTableFB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit net48 mscorlib не имеет [NotNullWhen(false)] на IsNullOrWhiteSpace, поэтому guard сам по себе не сужает null-state. Явная проверка `is null` первым дизъюнктом обучает анализатор без оператора подавления `!`; порядок выбран так, чтобы проверка выполнялась в рантайме и не помечалась линтером как мёртвая. Co-Authored-By: Claude Opus 4.8 (1M context) --- NtoLib/Recipes/MbeTable/MbeTableFB.Configuration.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/NtoLib/Recipes/MbeTable/MbeTableFB.Configuration.cs b/NtoLib/Recipes/MbeTable/MbeTableFB.Configuration.cs index 1947ff4..41fa704 100644 --- a/NtoLib/Recipes/MbeTable/MbeTableFB.Configuration.cs +++ b/NtoLib/Recipes/MbeTable/MbeTableFB.Configuration.cs @@ -39,7 +39,9 @@ private AppConfiguration LoadConfigurationInternal() // Backwards compatibility: projects saved before the ConfigDirPath property existed (#67) // deserialize with a null field, and a manually blanked property must not reach // Path.Combine as a relative path. Both fall back to the pre-#67 location. - if (string.IsNullOrWhiteSpace(_configDirPath)) + // The explicit null check narrows the compiler's null-state: net48 mscorlib has no + // [NotNullWhen(false)] on IsNullOrWhiteSpace, so the call alone would not. + if (_configDirPath is null || string.IsNullOrWhiteSpace(_configDirPath)) { _configDirPath = Path.Combine(AppContext.BaseDirectory, DefaultConfigFolderName); }