After issues like #4916, introducing new attributes, we should remove Token class in trunk, as it leads to code that ignores those new attributes (like PositionLengthAttribute, ScriptAttribute, KeywordAttribute,...). If you want a holder for all Attributes a TokenStream, use TS.cloneAttributes().
Migrated from LUCENE-3844 by Uwe Schindler (@uschindler), updated May 09 2016
Linked issues:
After issues like #4916, introducing new attributes, we should remove Token class in trunk, as it leads to code that ignores those new attributes (like PositionLengthAttribute, ScriptAttribute, KeywordAttribute,...). If you want a holder for all Attributes a TokenStream, use TS.cloneAttributes().
Migrated from LUCENE-3844 by Uwe Schindler (@uschindler), updated May 09 2016
Linked issues: