lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mhern...@apache.org
Subject [45/50] [abbrv] git commit: Fix dumb Java Reader API assertion
Date Tue, 24 Sep 2013 18:33:21 GMT
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 <paulirwin@gmail.com>
Authored: Fri Aug 9 14:33:50 2013 -0400
Committer: Paul Irwin <paulirwin@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;


Mime
View raw message