From 6c5621f16c61b8cc794b73fb8efecb3092f52d58 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Fri, 8 Jul 2011 11:26:03 +0000 Subject: [PATCH] fixed dead store variable git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1144269 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/analysis/th/TestThaiAnalyzer.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/modules/analysis/common/src/test/org/apache/lucene/analysis/th/TestThaiAnalyzer.java b/modules/analysis/common/src/test/org/apache/lucene/analysis/th/TestThaiAnalyzer.java index 81f2e278204..dc4ab1f06a6 100644 --- a/modules/analysis/common/src/test/org/apache/lucene/analysis/th/TestThaiAnalyzer.java +++ b/modules/analysis/common/src/test/org/apache/lucene/analysis/th/TestThaiAnalyzer.java @@ -97,16 +97,15 @@ public class TestThaiAnalyzer extends BaseTokenStreamTestCase { */ public void testPositionIncrements() throws Exception { assumeTrue("JRE does not support Thai dictionary-based BreakIterator", ThaiWordFilter.DBBI_AVAILABLE); - ThaiAnalyzer analyzer = new ThaiAnalyzer(TEST_VERSION_CURRENT); - - assertAnalyzesTo(new ThaiAnalyzer(TEST_VERSION_CURRENT), "การที่ได้ต้อง the แสดงว่างานดี", + final ThaiAnalyzer analyzer = new ThaiAnalyzer(TEST_VERSION_CURRENT); + assertAnalyzesTo(analyzer, "การที่ได้ต้อง the แสดงว่างานดี", new String[] { "การ", "ที่", "ได้", "ต้อง", "แสดง", "ว่า", "งาน", "ดี" }, new int[] { 0, 3, 6, 9, 18, 22, 25, 28 }, new int[] { 3, 6, 9, 13, 22, 25, 28, 30 }, new int[] { 1, 1, 1, 1, 2, 1, 1, 1 }); // case that a stopword is adjacent to thai text, with no whitespace - assertAnalyzesTo(new ThaiAnalyzer(TEST_VERSION_CURRENT), "การที่ได้ต้องthe แสดงว่างานดี", + assertAnalyzesTo(analyzer, "การที่ได้ต้องthe แสดงว่างานดี", new String[] { "การ", "ที่", "ได้", "ต้อง", "แสดง", "ว่า", "งาน", "ดี" }, new int[] { 0, 3, 6, 9, 17, 21, 24, 27 }, new int[] { 3, 6, 9, 13, 21, 24, 27, 29 },