In some circumstances, use of the id() function within
a predicate or sort key may cause a
NullPointerException or UnsupportedOperationException.
This is another expression reduction bug. Actually two
bugs: the getDependencies() routine for the Id
function does not make allowance for the dependencies
of the supplied argument, and when the expression is
reduced more than once, the identity of the original
bound document is lost. As is often the case with
expression reduction, it's difficult to be precise
about the constructs that reveal the bug, except that
they are usually complex: the example in the bug
report (from Evan Lenz) was:
(../@job | id(../@spouse)/@job)]"
Evan reports that this worked in releases before
6.4.4, but this can only have been by luck, as the
coding errors were present in earlier releases.
Source code now fixed.