From lucene-net-dev-return-985-apmail-incubator-lucene-net-dev-archive=incubator.apache.org@incubator.apache.org Fri Aug 31 22:35:54 2007 Return-Path: Delivered-To: apmail-incubator-lucene-net-dev-archive@locus.apache.org Received: (qmail 39356 invoked from network); 31 Aug 2007 22:35:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 31 Aug 2007 22:35:53 -0000 Received: (qmail 94230 invoked by uid 500); 31 Aug 2007 22:35:47 -0000 Delivered-To: apmail-incubator-lucene-net-dev-archive@incubator.apache.org Received: (qmail 93985 invoked by uid 500); 31 Aug 2007 22:35:46 -0000 Mailing-List: contact lucene-net-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucene-net-dev@incubator.apache.org Delivered-To: mailing list lucene-net-dev@incubator.apache.org Received: (qmail 93975 invoked by uid 99); 31 Aug 2007 22:35:46 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Aug 2007 15:35:46 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 31 Aug 2007 22:35:39 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 2F984714211 for ; Fri, 31 Aug 2007 15:35:19 -0700 (PDT) Message-ID: <1097474.1188599719191.JavaMail.jira@brutus> Date: Fri, 31 Aug 2007 15:35:19 -0700 (PDT) From: "Digy (JIRA)" To: lucene-net-dev@incubator.apache.org Subject: [jira] Commented: (LUCENENET-96) NUnit test for Lucene.Net.Store.TestLockFactory.TestLockClassProperty In-Reply-To: <11350577.1188237331276.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/LUCENENET-96?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524206 ] Digy commented on LUCENENET-96: ------------------------------- Hi George, When I looked at the java code, i saw that NativeFSLockFactory and SimpleFSLockFactory have parameterless constructors and setLockDir methods, only for the use of FSDirector. These methods are not available in the Lucene.net. ------------------------------------- /** * Create a SimpleFSLockFactory instance, with null (unset) * lock directory. This is package-private and is only * used by FSDirectory when creating this LockFactory via * the System property * org.apache.lucene.store.FSDirectoryLockFactoryClass. */ SimpleFSLockFactory() throws IOException { this((File) null); } /** * Set the lock directory. This is package-private and is * only used externally by FSDirectory when creating this * LockFactory via the System property * org.apache.lucene.store.FSDirectoryLockFactoryClass. */ void setLockDir(File lockDir) throws IOException { this.lockDir = lockDir; } ------------------------------------- To be able to pass the Nunit test of "Store.TestLockFactory.TestLockClassProperty": As in Java Version, a) These methods can be added to NativeFSLockFactory and SimpleFSLockFactory b) FSDirectory.Init can be modified by inserting the translated java-codes (which are also not available in Lucene.Net) if (lockFactory instanceof NativeFSLockFactory) { ((NativeFSLockFactory) lockFactory).setLockDir(path); } else if (lockFactory instanceof SimpleFSLockFactory) { ((SimpleFSLockFactory) lockFactory).setLockDir(path); } after the creation of the XXXXFSLockFactory class ( c.newInstance() ). But I think, patches I posted previously are more generic and this also doesn't mean divergence from java, since the existing codes already differ from it. DIGY > NUnit test for Lucene.Net.Store.TestLockFactory.TestLockClassProperty > --------------------------------------------------------------------- > > Key: LUCENENET-96 > URL: https://issues.apache.org/jira/browse/LUCENENET-96 > Project: Lucene.Net > Issue Type: Bug > Reporter: Digy > Priority: Minor > Attachments: FSDirectory.patch, SupportClass.patch, TestLockFactory.patch > > > After java2C# translation, i added "Set" method to SupportClass.AppSettings and modified the "get" methods. > Since NativeFSLockFactory does not have parameterless constructor, i modified FSDirectory to be able to create an instance of NativeFSLockFactory -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.