[ https://issues.apache.org/jira/browse/LUCENE-4910?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13625019#comment-13625019 ]
Uwe Schindler commented on LUCENE-4910: --------------------------------------- Read the Javadocs of the TokenStream class, it is documented like that. No more discussion needed. > 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-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org