github-code-scanning[bot] commented on code in PR #2161:
URL: https://github.com/apache/avro/pull/2161#discussion_r1145866021


##########
lang/csharp/src/apache/test/IO/JsonCodecTests.cs:
##########
@@ -285,6 +286,28 @@
             decoder.SkipArray();
         }
 
+        [Test]
+        public void TestJsonDecoderSpecificWithArray()
+        {
+            Root data = new Root();
+            Item item = new Item { id = 123456 };
+            data.myarray = new List<Item> { item };
+
+            DatumWriter<Root> writer = new 
SpecificDatumWriter<Root>(data.Schema);
+
+            ByteBufferOutputStream bbos = new ByteBufferOutputStream();
+
+            Encoder encoder = new JsonEncoder(data.Schema, bbos);
+            writer.Write(data, encoder);
+            encoder.Flush();
+
+            List<MemoryStream> listStreams = bbos.GetBufferList();
+
+            StreamReader reader = new StreamReader(listStreams[0]);

Review Comment:
   ## Missing Dispose call on local IDisposable
   
   Disposable 'StreamReader' is created but not disposed.
   
   [Show more 
details](https://github.com/apache/avro/security/code-scanning/2980)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to