Re: Greetings and questions about patches

2009-04-23 Thread Erick Erickson
Thanks all. Despite my aesthetic preference for removing unused code, I'm *really* not in favor of causing extra work (for myself or others) to satisfy it .. Especially when there's reasonable expectations that the code in question *will* be used in the foreseeable future. Ok, I'll leave the c

Re: Greetings and questions about patches

2009-04-23 Thread Michael McCandless
Welcome Erick! Because nextHighestPowerOfTwo methods are public, I think we cannot change what they return, nor remove them. At most we could deprecate them now (and remove in 3.0), though I think it's fine to simply keep them around even though nothing inside Lucene uses them today: since we are

Re: Greetings and questions about patches

2009-04-22 Thread Chris Miller
Issues: 1> none of these methods is ever called. Note that Yonik's suggested patch for LUCENE-1607 contains the following code: + public SimpleStringInterner(int sz) { +cache = new String[BitUtil.nextHighestPowerOfTwo(sz)]; + } ...so the int flavour of nextHighestPowerOfTwo() might be

Re: Greetings and questions about patches

2009-04-22 Thread Yonik Seeley
On Wed, Apr 22, 2009 at 9:33 PM, Erick Erickson wrote: > So, according to the coverage report, there are two methods that > are never executed by the unit tests (actually 4, 2 that operate on > ints and 2 that operate on longs), isPowerOfTwo and > nextHighestPowerOfTwo. nextHighestPowerOfTwo is es