Tokenizer tokenizer
= new org.apache.lucene.analysis.standard.StandardTokenizer
(Version.LUCENE_41,new StringReader("!!!"));
tokenizer.incrementToken();
拋出簡單的代碼拋出一個NullPointerException
java.lang.NullPointerException
at org.apache.lucene.analysis.standard.std34.StandardTokenizerImpl34.zzRefill(StandardTokenizerImpl34.java:812)
at org.apache.lucene.analysis.standard.std34.StandardTokenizerImpl34.getNextToken(StandardTokenizerImpl34.java:1019)
at org.apache.lucene.analysis.standard.StandardTokenizer.incrementToken(StandardTokenizer.java:180)
此代碼是工作好與Lucene的36,爲什麼它thorweing異常
感謝這是解決方案 – 2013-02-26 22:03:42