You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Shuji Umino (JIRA)" <ji...@apache.org> on 2013/04/05 13:54:15 UTC
[jira] [Created] (LUCENE-4910) JapaneseTokenizer
NullPointerException
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: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org