Hi,
On 6/21/07, siraj ahmed <[EMAIL PROTECTED]> wrote:
[...]
blogEntry = null;
while (queryResultNodeIterator.hasNext()) {
blogEntry = queryResultNodeIterator.nextNode();
}
[...]
return blogEntry;
Assuming getBlogEntry() calls getBlogEntryNode(), then the error could
simply be that the search you are running returns no results which
causes getBlogEntryNode() to return the default blogEntry value, i.e.
null.
I would rather use code like this:
if (queryResultNodeIterator.hasNext()) {
return queryResultNodeIterator.nextNode();
} else {
throw new BlogEntryNotFoundException();
}
BR,
Jukka Zitting