Return-Path: Delivered-To: apmail-incubator-jackrabbit-dev-archive@www.apache.org Received: (qmail 51901 invoked from network); 26 Feb 2006 22:08:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Feb 2006 22:08:21 -0000 Received: (qmail 12518 invoked by uid 500); 26 Feb 2006 22:08:19 -0000 Mailing-List: contact jackrabbit-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: jackrabbit-dev@incubator.apache.org Delivered-To: mailing list jackrabbit-dev@incubator.apache.org Received: (qmail 12506 invoked by uid 99); 26 Feb 2006 22:08:19 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 26 Feb 2006 14:08:17 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id 6C5E8DE for ; Sun, 26 Feb 2006 23:07:56 +0100 (CET) Message-ID: <1450460312.1140991676442.JavaMail.jira@ajax.apache.org> Date: Sun, 26 Feb 2006 23:07:56 +0100 (CET) From: "Stefan Guggisberg (JIRA)" To: jackrabbit-dev@incubator.apache.org Subject: [jira] Assigned: (JCR-328) TransitoryRepository with LocalFileSystem eventually causes Repository data to be stored at path '/' In-Reply-To: <1524810482.1140991153776.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/JCR-328?page=all ] Stefan Guggisberg reassigned JCR-328: ------------------------------------- Assign To: Stefan Guggisberg > TransitoryRepository with LocalFileSystem eventually causes Repository data to be stored at path '/' > ---------------------------------------------------------------------------------------------------- > > Key: JCR-328 > URL: http://issues.apache.org/jira/browse/JCR-328 > Project: Jackrabbit > Type: Bug > Components: core > Reporter: Mark Slater > Assignee: Stefan Guggisberg > > I'm using a TransitoryRepository for my unit testing, with the repository's file system specified as: > > > > I noticed today that when I run my unit tests Jackrabbit is creating four directories at the root of my hard drive: "meta", "namespaces", "nodetypes", and "data". I tracked the problem the fact that when a LocalFileSystem is closed, it sets the "root" to null - an invalid state. But when using a TransitoryRepository, the invalid state is never discovered because the LocalFileSystem object itself is not released, or re-initialized. It is simply used to create BasedFileSystem objects in RepositoryImpl. Calls to BasedFileSystem defer to the LocalFileSystem object that now has a null root. Inside the LocalFileSystem, all the calls to Java's io.File constructor have a "null" parent parameter, causing File to fall back to its single argument constructor which sees the path "/meta" and happily creates files at the root of the disk. > I'm not sure what the best solution is, but some thoughts I've had are: > - don't set the "root" property to null when closing a LocalFileSystem > - make RepositoryConfig re-init the FileSystem variable when it is accessed. > - don't cache the RepositoryConfig in TransitoryRepository (this might also require a new constructor that takes a class-path resource for the repository configuration file) -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira