lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [1/2] lucenenet git commit: return -1 if reader returns 0 or less
Date Sat, 27 Dec 2014 19:00:22 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/master 959ceb954 -> 11917175d


return -1 if reader returns 0 or less


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/ff4ef284
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/ff4ef284
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/ff4ef284

Branch: refs/heads/master
Commit: ff4ef2840d4d5f0cfa7d27db2973d84e64bd666a
Parents: 6b16956
Author: Laimonas Simutis <laimis@gmail.com>
Authored: Sat Dec 27 13:38:29 2014 -0500
Committer: Laimonas Simutis <laimis@gmail.com>
Committed: Sat Dec 27 13:38:29 2014 -0500

----------------------------------------------------------------------
 src/Lucene.Net.TestFramework/Analysis/MockTokenizer.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ff4ef284/src/Lucene.Net.TestFramework/Analysis/MockTokenizer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.TestFramework/Analysis/MockTokenizer.cs b/src/Lucene.Net.TestFramework/Analysis/MockTokenizer.cs
index 7cb9f28..894cf23 100644
--- a/src/Lucene.Net.TestFramework/Analysis/MockTokenizer.cs
+++ b/src/Lucene.Net.TestFramework/Analysis/MockTokenizer.cs
@@ -248,14 +248,14 @@ namespace Lucene.Net.Analysis
                         // read(char[])
                         char[] c = new char[1];
                         int ret = input.Read(c, 0, c.Length);
-                        return ret == 0 ? -1 : c[0];
+                        return ret <= 0 ? -1 : c[0];
                     }
                 case 1:
                     {
                         // read(char[], int, int)
                         char[] c = new char[2];
                         int ret = input.Read(c, 1, 1);
-                        return ret == 0 ? -1 : c[1];
+                        return ret <= 0 ? -1 : c[1];
                     }
                 /* LUCENE TO-DO not sure if needed, CharBuffer not supported
                   case 2:


Mime
View raw message