From 2fd8f54e791f32b6036b49d30857f57b8f544255 Mon Sep 17 00:00:00 2001 From: Yonik Seeley Date: Thu, 1 Jun 2006 21:22:29 +0000 Subject: [PATCH] ISOLatin1AccentFilter fails to preserve positionIncrement: LUCENE-583 git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@410960 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/analysis/ISOLatin1AccentFilter.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/java/org/apache/lucene/analysis/ISOLatin1AccentFilter.java b/src/java/org/apache/lucene/analysis/ISOLatin1AccentFilter.java index 8252d1e72c4..aa6411cb41e 100644 --- a/src/java/org/apache/lucene/analysis/ISOLatin1AccentFilter.java +++ b/src/java/org/apache/lucene/analysis/ISOLatin1AccentFilter.java @@ -30,10 +30,9 @@ public class ISOLatin1AccentFilter extends TokenFilter { public final Token next() throws java.io.IOException { final Token t = input.next(); - if (t == null) - return null; - // Return a token with filtered characters. - return new Token(removeAccents(t.termText()), t.startOffset(), t.endOffset(), t.type()); + if (t != null) + t.setTermText(removeAccents(t.termText())); + return t; } /**