Return-Path: X-Original-To: apmail-sling-commits-archive@www.apache.org Delivered-To: apmail-sling-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D20AF68A4 for ; Fri, 20 May 2011 06:40:44 +0000 (UTC) Received: (qmail 48559 invoked by uid 500); 20 May 2011 06:40:44 -0000 Delivered-To: apmail-sling-commits-archive@sling.apache.org Received: (qmail 48516 invoked by uid 500); 20 May 2011 06:40:44 -0000 Mailing-List: contact commits-help@sling.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@sling.apache.org Delivered-To: mailing list commits@sling.apache.org Received: (qmail 48509 invoked by uid 99); 20 May 2011 06:40:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 May 2011 06:40:43 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 May 2011 06:40:41 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9E5C123889ED; Fri, 20 May 2011 06:40:20 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1125254 - /sling/trunk/installer/providers/jcr/src/main/java/org/apache/sling/installer/provider/jcr/impl/JcrInstaller.java Date: Fri, 20 May 2011 06:40:20 -0000 To: commits@sling.apache.org From: cziegeler@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110520064020.9E5C123889ED@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cziegeler Date: Fri May 20 06:40:20 2011 New Revision: 1125254 URL: http://svn.apache.org/viewvc?rev=1125254&view=rev Log: SLING-2031 : Use bundle location to create path for persisting new configurations Modified: sling/trunk/installer/providers/jcr/src/main/java/org/apache/sling/installer/provider/jcr/impl/JcrInstaller.java Modified: sling/trunk/installer/providers/jcr/src/main/java/org/apache/sling/installer/provider/jcr/impl/JcrInstaller.java URL: http://svn.apache.org/viewvc/sling/trunk/installer/providers/jcr/src/main/java/org/apache/sling/installer/provider/jcr/impl/JcrInstaller.java?rev=1125254&r1=1125253&r2=1125254&view=diff ============================================================================== --- sling/trunk/installer/providers/jcr/src/main/java/org/apache/sling/installer/provider/jcr/impl/JcrInstaller.java (original) +++ sling/trunk/installer/providers/jcr/src/main/java/org/apache/sling/installer/provider/jcr/impl/JcrInstaller.java Fri May 20 06:40:20 2011 @@ -298,15 +298,13 @@ public class JcrInstaller implements Eve // setup default path for new configurations this.newConfigPath = OsgiUtil.toString(context.getProperties().get(PROP_NEW_CONFIG_PATH), DEFAULT_NEW_CONFIG_PATH); - final boolean postSlash = !newConfigPath.endsWith("/"); - if ( postSlash ) { + final boolean postSlash = newConfigPath.endsWith("/"); + if ( !postSlash ) { this.newConfigPath = newConfigPath.concat("/"); } - final boolean preSlash = !newConfigPath.startsWith("/"); - if ( preSlash ) { - this.newConfigPath = this.folderNameFilter.getRootPaths()[0] + "/" + this.newConfigPath; - } else { - this.newConfigPath = this.newConfigPath; + final boolean preSlash = newConfigPath.startsWith("/"); + if ( !preSlash ) { + this.newConfigPath = this.folderNameFilter.getRootPaths()[0] + '/' + this.newConfigPath; } backgroundThread = new StoppableThread();