Skip to content

Commit

Permalink
Added a using to dispose a StreamReader
Browse files Browse the repository at this point in the history
  • Loading branch information
darrelmiller committed Jan 16, 2023
1 parent 7638805 commit a8a693d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Microsoft.OpenApi.Hidi/OpenApiService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ private static XslCompiledTransform GetFilterTransform()
private static Stream ApplyFilterToCsdl(Stream csdlStream, string entitySetOrSingleton, XslCompiledTransform transform)
{
Stream stream;
StreamReader inputReader = new(csdlStream);
using StreamReader inputReader = new(csdlStream, leaveOpen: true);
XmlReader inputXmlReader = XmlReader.Create(inputReader);
MemoryStream filteredStream = new();
StreamWriter writer = new(filteredStream);
Expand Down

0 comments on commit a8a693d

Please sign in to comment.