You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by mh...@apache.org on 2013/09/24 20:33:21 UTC
[45/50] [abbrv] git commit: Fix dumb Java Reader API assertion
Fix dumb Java Reader API assertion
if you return 0, that means you're at the end. WHY java, WHY would you
return -1?!
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/c1883768
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/c1883768
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/c1883768
Branch: refs/heads/branch_4x
Commit: c1883768c0c9b367746eafd959113a02f70fa2b6
Parents: 02a37a0
Author: Paul Irwin <pa...@gmail.com>
Authored: Fri Aug 9 14:33:50 2013 -0400
Committer: Paul Irwin <pa...@gmail.com>
Committed: Fri Aug 9 14:33:50 2013 -0400
----------------------------------------------------------------------
src/contrib/QueryParsers/Classic/FastCharStream.cs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c1883768/src/contrib/QueryParsers/Classic/FastCharStream.cs
----------------------------------------------------------------------
diff --git a/src/contrib/QueryParsers/Classic/FastCharStream.cs b/src/contrib/QueryParsers/Classic/FastCharStream.cs
index 6e3a39e..20d7920 100644
--- a/src/contrib/QueryParsers/Classic/FastCharStream.cs
+++ b/src/contrib/QueryParsers/Classic/FastCharStream.cs
@@ -60,7 +60,7 @@ namespace Lucene.Net.QueryParsers.Classic
int charsRead = // fill space in buffer
input.Read(buffer, newPosition, buffer.Length - newPosition);
- if (charsRead == -1)
+ if (charsRead <= 0)
throw new IOException("read past eof");
else
bufferLength += charsRead;