Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Microsoft.OpenApi.Readers/OpenApiTextReaderReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public T ReadFragment<T>(TextReader input, OpenApiSpecVersion version, out OpenA
{
diagnostic = new OpenApiDiagnostic();
diagnostic.Errors.Add(new OpenApiError($"#line={ex.Start.Line}", ex.Message));
return default(T);
return default;
}

return new OpenApiYamlDocumentReader(this._settings).ReadFragment<T>(yamlDocument, version, out diagnostic);
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.OpenApi.Readers/ParseNodes/MapNode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public override Dictionary<string, T> CreateMap<T>(Func<MapNode, T> map)
{
Context.StartObject(key);
value = n.Value as YamlMappingNode == null
? default(T)
? default
: map(new MapNode(Context, n.Value as YamlMappingNode));
}
finally
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.OpenApi.Readers/ParsingContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,10 @@ public T GetFromTempStorage<T>(string key, object scope = null)
}
else if (!_scopedTempStorage.TryGetValue(scope, out storage))
{
return default(T);
return default;
}

return storage.TryGetValue(key, out var value) ? (T)value : default(T);
return storage.TryGetValue(key, out var value) ? (T)value : default;
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion test/Microsoft.OpenApi.Tests/Visitors/InheritanceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public void ExpectedVirtualsInvolved()

visitor = new TestVisitor();

visitor.Enter(default(string));
visitor.Enter(default);
visitor.Visit(default(OpenApiDocument));
visitor.Visit(default(OpenApiInfo));
visitor.Visit(default(OpenApiContact));
Expand Down