NightOwl888 commented on code in PR #769:
URL: https://github.com/apache/lucenenet/pull/769#discussion_r1029166739


##########
src/Lucene.Net/Store/InputStreamDataInput.cs:
##########
@@ -25,16 +25,16 @@ namespace Lucene.Net.Store
     /// </summary>
     public class InputStreamDataInput : DataInput, IDisposable
     {
-        private BinaryReader _reader;
+        private readonly Stream _is;
 
         public InputStreamDataInput(Stream @is)
         {
-            this._reader = new BinaryReader(@is);
+            this._is = @is ?? throw new ArgumentNullException(nameof(@is));

Review Comment:
   Please add a comment after this line `// LUCENENET specific - added null 
guard clause`



##########
src/Lucene.Net/Store/OutputStreamDataOutput.cs:
##########
@@ -25,21 +25,21 @@ namespace Lucene.Net.Store
     /// </summary>
     public class OutputStreamDataOutput : DataOutput, IDisposable
     {
-        private readonly BinaryWriter _writer;
+        private readonly Stream _os;
 
         public OutputStreamDataOutput(Stream os)
         {
-            this._writer = new BinaryWriter(os);
+            this._os = os;

Review Comment:
   Please add a null guard clause here, as well. Add a comment after this line 
`// LUCENENET specific - added null guard clause`



-- 
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: dev-unsubscr...@lucenenet.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to