Shuji Umino created LUCENE-4910:
-----------------------------------
Summary: JapaneseTokenizer NullPointerException
Key: LUCENE-4910
URL: https://issues.apache.org/jira/browse/LUCENE-4910
Project: Lucene - Core
Issue Type: Bug
Components: modules/analysis
Affects Versions: 4.2
Reporter: Shuji Umino
I use lucene 4.2.1 upgrade from 4.0.
RollingCharBuffer required Reader,
buffer.init(null) called in JapaneseTokenizer custructor.
> Test code
----------------------------------------------------------------------
public static void main(String[] args) throws Exception {
String text = "test abc";
JapaneseTokenizer tokenizer = new JapaneseTokenizer(
new StringReader(text), null, false, Mode.NORMAL);
//tokenizer.reset();
while (tokenizer.incrementToken()) {
CharTermAttribute termAtt =
tokenizer.getAttribute(CharTermAttribute.class);
System.out.println(termAtt);
}
}
> Exception
----------------------------------------------------------------------
Exception in thread "main" java.lang.NullPointerException
at
org.apache.lucene.analysis.util.RollingCharBuffer.get(RollingCharBuffer.java:86)
at
org.apache.lucene.analysis.ja.JapaneseTokenizer.parse(JapaneseTokenizer.java:602)
at
org.apache.lucene.analysis.ja.JapaneseTokenizer.incrementToken(JapaneseTokenizer.java:452)
----------------------------------------------------------------------
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]