lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shai Erera (JIRA)" <>
Subject [jira] [Commented] (LUCENE-3259) need to clarify/change D&Penum api for hasPayload/getPayload
Date Thu, 30 Jun 2011 02:57:28 GMT


Shai Erera commented on LUCENE-3259:

If D&PEnum says getPayload() returns null if there is no payload, then why do you say
it's not defined? I don't mind if we change the contract to hasPayload() first, then getPayload().

But if we want to follow, e.g. DocIdSetIterator, where you call nextDoc() and get the doc
ID back, without calling next() followed by docID(), then I think getPayload() should be enough
here too. Especially for cases where we know a payload was written.

What do you think?

> need to clarify/change D&Penum api for hasPayload/getPayload
> ------------------------------------------------------------
>                 Key: LUCENE-3259
>                 URL:
>             Project: Lucene - Java
>          Issue Type: Bug
>            Reporter: Robert Muir
> We encountered this bug while integrating the faceting module:
> * D&PEnum says getPayload() will return null if there is no payload.
> * however, in some cases this is not what happens.
> * things do work (with no exceptions), if you always check hasPayload() first.
> The easiest fix could be to correct the javadocs, and say that you should always check
hasPayload() first... otherwise getPayload() is not defined.

This message is automatically generated by JIRA.
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message