Skip to content

Commit 6bed103

Browse files
authored
AddRange extension enhancement (#771)
1 parent 3278e8b commit 6bed103

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/KubernetesClient/Util/Common/CollectionsExtensions.cs

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ internal static class CollectionsExtensions
44
{
55
public static void AddRange<T>(this HashSet<T> hashSet, ICollection<T> items)
66
{
7-
if (items == null)
7+
if (items == null || hashSet == null)
88
{
99
return;
1010
}
1111

1212
foreach (var item in items)
1313
{
14-
hashSet?.Add(item);
14+
hashSet.Add(item);
1515
}
1616
}
1717

0 commit comments

Comments
 (0)