Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 75750 invoked from network); 23 Feb 2010 06:42:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 23 Feb 2010 06:42:43 -0000 Received: (qmail 38451 invoked by uid 500); 23 Feb 2010 06:42:41 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 38325 invoked by uid 500); 23 Feb 2010 06:42:40 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 38317 invoked by uid 99); 23 Feb 2010 06:42:39 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Feb 2010 06:42:39 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of serera@gmail.com designates 74.125.78.27 as permitted sender) Received: from [74.125.78.27] (HELO ey-out-2122.google.com) (74.125.78.27) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 Feb 2010 06:42:32 +0000 Received: by ey-out-2122.google.com with SMTP id d26so771997eyd.3 for ; Mon, 22 Feb 2010 22:42:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=cMlHLOAQ+oQtkbApYf8wai53jkslgyQB0umVEixOStU=; b=MC9HjzVoIueaLs1ECDYbAaKR4aVl/Rzd6dnkSp1A7QHV/PVc+Xh0aqSkP8FcOsC4GG O1cELpViPZHMSyMu65hjoEuxtWJOoGOtuLpVCMe1jVnz9cNSeOn2dnq8KHuapDqt1fkx VDuDWEQPYYOidj2y43AI+tlgzjNwBjpLK+Ux8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=W+FyFHWTrfqsCjuhY/IQ+n6R+6Kc1rtWXqPZ41NXiEjmjGbscZFBmDLN9ZAk7G0qfN wtZ8/gq0JbJZM+zGQ5PQlB5+Uy7Dk8bisI59WtwlUMECp0e47o5Hq0Qf2aHeQPK6KXT+ /UpkgJo1sfCHXQ91nJxA9/KyragPbk1WxDDDM= MIME-Version: 1.0 Received: by 10.213.100.129 with SMTP id y1mr296594ebn.47.1266907331752; Mon, 22 Feb 2010 22:42:11 -0800 (PST) Date: Tue, 23 Feb 2010 08:42:11 +0200 Message-ID: <786fde51002222242y7504f736n440b92bdb9c60138@mail.gmail.com> Subject: IndexFileNames From: Shai Erera To: java-dev@lucene.apache.org Content-Type: multipart/alternative; boundary=001636c5a49f78f28304803ed98e --001636c5a49f78f28304803ed98e Content-Type: text/plain; charset=ISO-8859-1 Hi, I've noticed that IFN is package private, including its constants and methods. Any reason why not make it public? I need to create my own Directory, and would like to query whether a file is 'my file' or Lucene's file. Getting access to the extensions can help. Currently I have to put my code in o.a.l package, which I prefer not to. Also, I think the constants could be wrong in some situations. They only include the extension itself, w/o the "." part. That leads to many places in the code where I see this fname + "." + IFN.extension. Two problems: (1) Doing "." + ext is just a waste - it's really not needed. (2) If someone only checks for the extension, without adding the "." part, he can accidentally think that fnamedel is a deletion file .. I'd like to patch this, but want to validate with the community before I create an issue. Making it public is trivial. Changing the extension name is more problematic for back-compat, but I think currently it's just wrong ... Unless we come up w/ new names for the extensions, which is annoying. Can we sacrifice back-compat for this thing? Thanks, Shai --001636c5a49f78f28304803ed98e Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,

I've noticed that IFN is package private, i= ncluding its constants and methods. Any reason why not make it public? I ne= ed to create my own Directory, and would like to query whether a file is &#= 39;my file' or Lucene's file. Getting access to the extensions can = help. Currently I have to put my code in o.a.l package, which I prefer not = to.

Also, I think the constants could be wrong in some situations. They onl= y include the extension itself, w/o the "." part. That leads to m= any places in the code where I see this <code>fname + "." += IFN.extension</code>. Two problems:
(1) Doing "." + ext is just a waste - it's really not needed.=
(2) If someone only checks for the extension, without adding the "= ." part, he can accidentally think that fnamedel is a deletion file ..=

I'd like to patch this, but want to validate with the community bef= ore I create an issue. Making it public is trivial. Changing the extension = name is more problematic for back-compat, but I think currently it's ju= st wrong ... Unless we come up w/ new names for the extensions, which is an= noying. Can we sacrifice back-compat for this thing?

Thanks,
Shai
--001636c5a49f78f28304803ed98e--