We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 04e3c31 commit 87e5e8dCopy full SHA for 87e5e8d
1 file changed
src/Microsoft.ComponentDetection.Common/PatternMatchingUtility.cs
@@ -79,7 +79,7 @@ public sealed class CompiledMatcher
79
private readonly string[] patterns;
80
81
public CompiledMatcher(IEnumerable<string> patterns)
82
- : this(patterns?.ToArray()!)
+ : this(patterns is string[] arr ? arr : (patterns ?? throw new ArgumentNullException(nameof(patterns))).ToArray())
83
{
84
}
85
0 commit comments