lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sim...@apache.org
Subject svn commit: r832554 - /lucene/java/trunk/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ngram/EdgeNGramTokenizer.java
Date Tue, 03 Nov 2009 20:58:14 GMT
Author: simonw
Date: Tue Nov  3 20:58:12 2009
New Revision: 832554

URL: http://svn.apache.org/viewvc?rev=832554&view=rev
Log:
Trivial fix of ignored return value of reader.read(). Done during hackathon - review by uschindler

Modified:
    lucene/java/trunk/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ngram/EdgeNGramTokenizer.java

Modified: lucene/java/trunk/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ngram/EdgeNGramTokenizer.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ngram/EdgeNGramTokenizer.java?rev=832554&r1=832553&r2=832554&view=diff
==============================================================================
--- lucene/java/trunk/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ngram/EdgeNGramTokenizer.java
(original)
+++ lucene/java/trunk/contrib/analyzers/common/src/java/org/apache/lucene/analysis/ngram/EdgeNGramTokenizer.java
Tue Nov  3 20:58:12 2009
@@ -180,8 +180,8 @@
     if (!started) {
       started = true;
       char[] chars = new char[1024];
-      input.read(chars);
-      inStr = new String(chars).trim();  // remove any leading or trailing spaces
+      int charsRead = input.read(chars);
+      inStr = new String(chars, 0, charsRead).trim();  // remove any leading or trailing
spaces
       inLen = inStr.length();
       gramSize = minGram;
     }



Mime
View raw message