Re: Add Token.copyInto(Token) API

2008-11-13 Thread Grant Ingersoll
Don't want to discourage you from contributing it, just suggesting you may want to make sure the people working on that patch are aware of the issue such that maybe it can be addressed. On Nov 13, 2008, at 10:14 AM, Shai Erera wrote: Thanks. I am aware of this thread. Indeed it will change

Re: Add Token.copyInto(Token) API

2008-11-13 Thread Shai Erera
Thanks. I am aware of this thread. Indeed it will change the way TokenStreams are handled, and so copying a Token may not be necessary. However, I can't tell now whether this won't be necessary - I guess I'll just have to wait until it's out and I start using it :-) Anyway, I've implemented it for

Re: Add Token.copyInto(Token) API

2008-11-12 Thread Grant Ingersoll
Are you aware of LUCENE-1422? There is likely going to be a new way of dealing w/ TokenStreams all together, so you might want to have a look there before continuing. On Nov 12, 2008, at 1:51 PM, Shai Erera wrote: Hi, I was thinking about adding a copyInto method to Token. The only way

Add Token.copyInto(Token) API

2008-11-12 Thread Shai Erera
Hi, I was thinking about adding a copyInto method to Token. The only way to clone a token is by using its clone() or clone(char[], int, int, int, int) methods. Both do the job, but allocate a Token instance. While in 2.4 a Token constructor may actually get a char[] as input (thus saving a char[]