Skip to content

Commit a03e043

Browse files
nkolev92Copilot
andcommitted
RemoteSourceDependencyInfo: replace contentUri null check with NULL_INC remark
Remove the newly-added ArgumentNullException guard for contentUri to avoid introducing a new throw in a previously-permissive code path. The non-null annotation is kept but marked with NULL_INC for future telemetry-guided follow-up. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 3bb1196 commit a03e043

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/NuGet.Core/NuGet.Protocol/RemoteSourceDependencyInfo.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ public RemoteSourceDependencyInfo(
3838
throw new ArgumentNullException(nameof(dependencyGroups));
3939
}
4040

41-
if (contentUri == null)
42-
{
43-
throw new ArgumentNullException(nameof(contentUri));
44-
}
45-
4641
Identity = identity;
4742
Listed = listed;
4843
DependencyGroups = dependencyGroups.ToList();
@@ -67,6 +62,11 @@ public RemoteSourceDependencyInfo(
6762
/// <summary>
6863
/// The content url of this resource.
6964
/// </summary>
65+
/// <remarks>
66+
/// NULL_INC: Annotated as non-null but no runtime check is enforced in the constructor
67+
/// to avoid introducing a new throw in a previously-permissive code path.
68+
/// Revisit with telemetry to confirm callers never pass null.
69+
/// </remarks>
7070
public string ContentUri { get; set; }
7171

7272
public bool Equals(RemoteSourceDependencyInfo? other)

0 commit comments

Comments
 (0)