Return-Path: Delivered-To: apmail-sling-commits-archive@www.apache.org Received: (qmail 52914 invoked from network); 18 Jan 2011 08:42:03 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 18 Jan 2011 08:42:03 -0000 Received: (qmail 49200 invoked by uid 500); 18 Jan 2011 08:42:03 -0000 Delivered-To: apmail-sling-commits-archive@sling.apache.org Received: (qmail 49125 invoked by uid 500); 18 Jan 2011 08:42:02 -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 49118 invoked by uid 99); 18 Jan 2011 08:42:01 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 18 Jan 2011 08:42:01 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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; Tue, 18 Jan 2011 08:41:59 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id B610B23889EA; Tue, 18 Jan 2011 08:41:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1060238 - /sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/InternalResource.java Date: Tue, 18 Jan 2011 08:41:32 -0000 To: commits@sling.apache.org From: cziegeler@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20110118084132.B610B23889EA@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: cziegeler Date: Tue Jan 18 08:41:32 2011 New Revision: 1060238 URL: http://svn.apache.org/viewvc?rev=1060238&view=rev Log: Readd missing behaviour for properties and config files. Modified: sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/InternalResource.java Modified: sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/InternalResource.java URL: http://svn.apache.org/viewvc/sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/InternalResource.java?rev=1060238&r1=1060237&r2=1060238&view=diff ============================================================================== --- sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/InternalResource.java (original) +++ sling/trunk/installer/core/src/main/java/org/apache/sling/installer/core/impl/InternalResource.java Tue Jan 18 08:41:32 2011 @@ -69,7 +69,9 @@ public class InternalResource extends In type = InstallableResource.TYPE_PROPERTIES; } - if ( is != null && InstallableResource.TYPE_PROPERTIES.equals(type) ) { + if ( is != null && + (InstallableResource.TYPE_PROPERTIES.equals(type) || + type == null && isConfigExtension(resource.getId()))) { dict = readDictionary(is, getExtension(resource.getId())); if ( dict == null ) { throw new IOException("Unable to read dictionary from input stream: " + resource.getId()); @@ -240,6 +242,11 @@ public class InternalResource extends In return ht; } + private static boolean isConfigExtension(final String url) { + final String ext = getExtension(url); + return "config".equals(ext) || "properties".equals(ext) || "cfg".equals(ext); + } + /** Digest is needed to detect changes in data */ private static String computeDigest(final File data) throws IOException { try {