You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucenenet.apache.org by GitBox <gi...@apache.org> on 2022/11/22 07:07:55 UTC

[GitHub] [lucenenet] jeme opened a new pull request, #769: WIP: Align InputStreamDataInput and OutputStreamDataOutput closer to the Java Source

jeme opened a new pull request, #769:
URL: https://github.com/apache/lucenenet/pull/769

   Fixed InputStreamDataInput and OutputStreamDataOutput so that they don't wrap their input streams to BinaryReader/Writers to align the code closer to the Java source which just uses the input.
   
   This is a PR done a bit in blind as I can't build the full lucene source at the moment.


-- 
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-unsubscribe@lucenenet.apache.org

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


[GitHub] [lucenenet] NightOwl888 merged pull request #769: Align InputStreamDataInput and OutputStreamDataOutput closer to the Java Source

Posted by GitBox <gi...@apache.org>.
NightOwl888 merged PR #769:
URL: https://github.com/apache/lucenenet/pull/769


-- 
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-unsubscribe@lucenenet.apache.org

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


[GitHub] [lucenenet] NightOwl888 commented on a diff in pull request #769: WIP: Align InputStreamDataInput and OutputStreamDataOutput closer to the Java Source

Posted by GitBox <gi...@apache.org>.
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-unsubscribe@lucenenet.apache.org

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


[GitHub] [lucenenet] NightOwl888 commented on pull request #769: WIP: Align InputStreamDataInput and OutputStreamDataOutput closer to the Java Source

Posted by GitBox <gi...@apache.org>.
NightOwl888 commented on PR #769:
URL: https://github.com/apache/lucenenet/pull/769#issuecomment-1323477867

   Oh, as for being blind, we now have the tests running automatically when you submit a PR, so you can see the build and tests happen without running them locally.


-- 
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-unsubscribe@lucenenet.apache.org

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