diff --git a/BurnOutSharp/Matching/ContentMatchSet.cs b/BurnOutSharp/Matching/ContentMatchSet.cs index de756202..2735e56b 100644 --- a/BurnOutSharp/Matching/ContentMatchSet.cs +++ b/BurnOutSharp/Matching/ContentMatchSet.cs @@ -64,7 +64,7 @@ namespace BurnOutSharp.Matching { // If no content matches are defined, we fail out if (Matchers == null || !Matchers.Any()) - return (false, null); + return (false, new List()); // Initialize the position list List positions = new List(); @@ -74,7 +74,7 @@ namespace BurnOutSharp.Matching { (bool match, int position) = contentMatch.Match(fileContent); if (!match) - return (false, null); + return (false, new List()); else positions.Add(position); } diff --git a/BurnOutSharp/Matching/MatchUtil.cs b/BurnOutSharp/Matching/MatchUtil.cs index 6936c4aa..3fec7fdd 100644 --- a/BurnOutSharp/Matching/MatchUtil.cs +++ b/BurnOutSharp/Matching/MatchUtil.cs @@ -179,7 +179,7 @@ namespace BurnOutSharp.Matching { // If there's no mappings, we can't match if (matchers == null || !matchers.Any()) - return null; + return new List(); // Initialize the list of matched protections List matchedProtections = new List(); diff --git a/BurnOutSharp/Matching/PathMatchSet.cs b/BurnOutSharp/Matching/PathMatchSet.cs index 57c8ae14..f89594ae 100644 --- a/BurnOutSharp/Matching/PathMatchSet.cs +++ b/BurnOutSharp/Matching/PathMatchSet.cs @@ -63,7 +63,7 @@ namespace BurnOutSharp.Matching { // If no path matches are defined, we fail out if (Matchers == null || !Matchers.Any()) - return (false, null); + return (false, new List()); // Initialize the value list List values = new List(); @@ -73,7 +73,7 @@ namespace BurnOutSharp.Matching { (bool match, string value) = pathMatch.Match(stack); if (!match) - return (false, null); + return (false, new List()); else values.Add(value); }