BaseX stops executing when the following incomplete query is run:
basex "declare context value := doc('x');"
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.basex.query.expr.Expr.accept(org.basex.query.util.ASTVisitor)" because "this.expr" is null
at org.basex.query.expr.Single.accept(Single.java:74)
at org.basex.query.scope.MainModule.databases(MainModule.java:93)
at org.basex.query.QueryContext.addLocks(QueryContext.java:427)
at org.basex.query.QueryProcessor.addLocks(QueryProcessor.java:231)
at org.basex.core.cmd.AQuery.addLocks(AQuery.java:172)
at org.basex.core.locks.Locking.acquire(Locking.java:86)
at org.basex.core.jobs.Job.register(Job.java:48)
at org.basex.core.Command.execute(Command.java:90)
at org.basex.api.client.LocalSession.execute(LocalSession.java:131)
at org.basex.api.client.Session.execute(Session.java:36)
at org.basex.core.CLI.execute(CLI.java:94)
at org.basex.BaseX.<init>(BaseX.java:111)
at org.basex.BaseX.main(BaseX.java:44)
BaseX stops executing when the following incomplete query is run:
basex "declare context value := doc('x');"