BaseXdb/basex — Issue #312: NPE when lucene stemmer returns null
Author: dimitarp
Created: 2011-12-09 22:22:12+00:00
State: open

Example:

```xquery
'de' contains text 'test' using language 'pt' using stemming
```
Output:

Potential bug? Improper use? Your feedback is welcome:
Contact: basex-talk@mailman.uni-konstanz.de
Version: BaseX 7.1 beta
Java: Oracle Corporation, 1.7.0_147-icedtea
OS: Linux, amd64
Stack Trace:
java.lang.NullPointerException
org.basex.util.Token.token(Token.java:155)
org.basex.util.ft.LuceneStemmer.stem(LuceneStemmer.java:133)
org.basex.util.ft.Stemmer.nextToken(Stemmer.java:96)
org.basex.util.ft.FTLexer.nextToken(FTLexer.java:119)
org.basex.query.ft.FTTokenizer.cache(FTTokenizer.java:109)
org.basex.query.ft.FTWords.contains(FTWords.java:272)
org.basex.query.ft.FTWords.item(FTWords.java:125)
org.basex.query.ft.FTContains.item(FTContains.java:75)
org.basex.query.ft.FTContains.item(FTContains.java:1)
org.basex.query.expr.ParseExpr.iter(ParseExpr.java:56)
org.basex.query.QueryContext.iter(QueryContext.java:461)
org.basex.query.QueryContext.iter(QueryContext.java:281)
org.basex.query.QueryContext.eval(QueryContext.java:315)
org.basex.query.QueryProcessor.execute(QueryProcessor.java:135)
org.basex.core.cmd.AQuery.query(AQuery.java:89)
org.basex.core.cmd.XQuery.run(XQuery.java:22)
org.basex.core.Command.run(Command.java:329)
org.basex.core.Command.exec(Command.java:310)
org.basex.core.Command.execute(Command.java:78)
org.basex.gui.GUI.exec(GUI.java:417)
org.basex.gui.GUI$5.run(GUI.java:366)