mirror of https://github.com/apache/lucene.git
LUCENE-3897: fix silly bug in forced backtrace
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1305086 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7a43dc7432
commit
a278ba7a0c
|
@ -648,7 +648,7 @@ public final class KuromojiTokenizer extends Tokenizer {
|
|||
final Position posData2 = positions.get(pos2);
|
||||
for(int idx=0;idx<posData2.count;idx++) {
|
||||
//System.out.println(" idx=" + idx + " cost=" + cost);
|
||||
final int cost = posData.costs[idx];
|
||||
final int cost = posData2.costs[idx];
|
||||
if (cost < leastCost) {
|
||||
leastCost = cost;
|
||||
leastIDX = idx;
|
||||
|
|
|
@ -153,4 +153,14 @@ public class TestKuromojiAnalyzer extends BaseTokenStreamTestCase {
|
|||
new Integer(4)
|
||||
);
|
||||
}
|
||||
|
||||
// LUCENE-3897: this string (found by running all jawiki
|
||||
// XML through KuromojiAnalyzer) caused AIOOBE
|
||||
public void testCuriousString() throws Exception {
|
||||
final String s = "<li>06:26 2004年3月21日 [[利用者:Kzhr|Kzhr]] "お菓子な家族" を削除しました <em><nowiki>(即時削除: 悪戯。内容: &#39;KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK&#39;)</nowiki></em></li>";
|
||||
final Analyzer a = new KuromojiAnalyzer(TEST_VERSION_CURRENT, null, Mode.SEARCH,
|
||||
KuromojiAnalyzer.getDefaultStopSet(),
|
||||
KuromojiAnalyzer.getDefaultStopTags());
|
||||
checkAnalysisConsistency(random, a, random.nextBoolean(), s);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue