Skip to content

Commit d1b5fca

Browse files
authored
Merge pull request #1402 from SimonCropp/fix-null-ref-in-CreateList
fix null ref in CreateList
2 parents 5dd7f22 + a951511 commit d1b5fca

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/Microsoft.OpenApi.Readers/ParseNodes/ListNode.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ public override List<T> CreateList<T>(Func<MapNode, T> map)
2525
{
2626
if (_nodeList == null)
2727
{
28-
throw new OpenApiReaderException(
29-
$"Expected list at line {_nodeList.Start.Line} while parsing {typeof(T).Name}", _nodeList);
28+
throw new OpenApiReaderException($"Expected list while parsing {typeof(T).Name}");
3029
}
3130

3231
return _nodeList.Select(n => map(new(Context, n as YamlMappingNode)))

0 commit comments

Comments
 (0)