paulirwin commented on code in PR #1173: URL: https://github.com/apache/lucenenet/pull/1173#discussion_r2326012516
########## src/Lucene.Net.Replicator/IndexInputInputStream.cs: ########## @@ -65,8 +65,8 @@ public override void SetLength(long value) public override int Read(byte[] buffer, int offset, int count) { - int remaining = (int)(input.Length - input.Position); // LUCENENET specific: Renamed from getFilePointer() to match FileStream - int readCount = Math.Min(remaining, count); + long remaining = input.Length - input.Position; // LUCENENET specific: Renamed from getFilePointer() to match FileStream Review Comment: The code is already quite different from upstream, so I commented to be aware of overflow in the future, but that the method deviates from upstream to match Stream semantics. Also, the comment about `getFilePointer()` there seems unnecessary as it's not upstream (and was just in a previous version of our code), so I removed that comment. -- 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