On Tue, Feb 23, 2010 at 6:46 AM, Shai Erera <ser...@gmail.com> wrote: > I don't think performance is the issue here, but rather correctness. Someone > cannot just ask filename.endsWith(DELETION_EXT) as files like "file1del" > would match as well. So whenever you make such check, you need to add ".". > Again, not performance, but correctness.
I see. To address this we could create a new method on IFN (matchesExtension?), so one should never use string ops on IFN's constants? > If we make it public, then we can document that clearly. I don't mind if we > stay w/o the ".". I just thought that we can correct it, and gain few ticks > of performance as a side effect. But I don't want to argue about it :). > > So do you agree to change it to public? I can do that and also make sure > Lucene's code always calls segmentFileName ... OK let's leave the extensions as they are (no dots), make it public, and fix Lucene to always use IFNs methods when working with index file names? Thanks! Mike --------------------------------------------------------------------- To unsubscribe, e-mail: java-dev-unsubscr...@lucene.apache.org For additional commands, e-mail: java-dev-h...@lucene.apache.org