lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [12/22] lucenenet git commit: Fixed bug in HTMLStripCharFilter that was not allowing null characters to pass from the reader to the business logic, which was causing the Analysis.CharFilters.HTMLStripCharFilterTest.TestRandom() and Analysis.CharFilters.H
Date Thu, 01 Sep 2016 14:36:32 GMT
Fixed bug in HTMLStripCharFilter that was not allowing null characters to pass from the reader
to the business logic, which was causing the Analysis.CharFilters.HTMLStripCharFilterTest.TestRandom()
and Analysis.CharFilters.HTMLStripCharFilterTest.TestRandomHugeStrings() tests to fail.


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

Branch: refs/heads/analysis-work
Commit: 91f0608859f1f92c41aeeef29c7a1e8a98ea051b
Parents: 196ce64
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Fri Aug 26 11:26:42 2016 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sat Aug 27 02:17:59 2016 +0700

----------------------------------------------------------------------
 .../Analysis/CharFilter/HTMLStripCharFilter.cs                   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/91f06088/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/HTMLStripCharFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/HTMLStripCharFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/HTMLStripCharFilter.cs
index b0ca65e..cab9206 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/HTMLStripCharFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/HTMLStripCharFilter.cs
@@ -30879,7 +30879,7 @@ namespace Lucene.Net.Analysis.CharFilters
             for (; i < len; ++i)
             {
                 int ch = Read();
-                if (ch <= 0) break;
+                if (ch == -1) break;
                 cbuf[off++] = (char)ch;
             }
             return i > 0 ? i : (len == 0 ? 0 : -1);
@@ -31006,7 +31006,7 @@ namespace Lucene.Net.Analysis.CharFilters
             if (numRead == 0)
             {
                 int c = zzReader.Read();
-                if (c <= 0)
+                if (c == -1)
                 {
                     return true;
                 }


Mime
View raw message