lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DM Smith <>
Subject TokenStream problem?
Date Wed, 16 Jul 2008 13:44:25 GMT
According to the documentation for TokenStream, derived classes are to 
override either next() or next(Token).

Currently, if next(Token) is overridden, but next() is called, payload 
is cloned if it exists in the new token.

However, if next(Token) is called, it is up to the implementation to 
properly maintain payload. It seems to me that since next(Token) is 
called with a new Token(), that this should not be necessary.

Also, if next() is overridden, but next(Token) is called, then payload 
is never cloned, unless the overriding method handles it.

Can someone explain to me why this is correct?

-- DM

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

View raw message