small opto when charfilter is used: don't call this method twice in end

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1305742 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2012-03-27 06:06:51 +00:00
parent 5a4767cd4c
commit 620f9a5739
1 changed files with 2 additions and 1 deletions

View File

@ -260,7 +260,8 @@ public final class JapaneseTokenizer extends Tokenizer {
@Override
public void end() {
// Set final offset
offsetAtt.setOffset(correctOffset(pos), correctOffset(pos));
int finalOffset = correctOffset(pos);
offsetAtt.setOffset(finalOffset, finalOffset);
}
// Returns the added cost that a 2nd best segmentation is