mirror of
https://github.com/GoodOlClint/PSProxmoxVE.git
synced 2026-08-29 16:37:02 +00:00
fix: resolve net48-only nullable warnings (CS8601, CS8602, CS8604)
- CS8601: Add null-forgiving operator on guarded dictionary assignments in cmdlets where IsNullOrEmpty check precedes the assignment - CS8602: Add Assert.NotNull after JObject["data"] in xUnit model tests (JToken indexer returns nullable on net48) - CS8604: Add null-forgiving on guarded arguments in NodeService, WaitPveTaskCmdlet, GetPveTemplateCmdlet, and auth test parameters Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -52,7 +52,7 @@ namespace PSProxmoxVE.Core.Services
|
||||
var versionStr = data?["version"]?.ToString();
|
||||
if (string.IsNullOrEmpty(versionStr))
|
||||
throw new InvalidOperationException("Failed to retrieve PVE version from API response.");
|
||||
return PveVersion.Parse(versionStr);
|
||||
return PveVersion.Parse(versionStr!);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user