Return-Path: Delivered-To: apmail-sling-commits-archive@www.apache.org Received: (qmail 71292 invoked from network); 5 May 2010 09:20:31 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 5 May 2010 09:20:31 -0000 Received: (qmail 95992 invoked by uid 500); 5 May 2010 09:20:31 -0000 Delivered-To: apmail-sling-commits-archive@sling.apache.org Received: (qmail 95926 invoked by uid 500); 5 May 2010 09:20:30 -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 95915 invoked by uid 99); 5 May 2010 09:20:30 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 May 2010 09:20:30 +0000 X-ASF-Spam-Status: No, hits=-1408.2 required=10.0 tests=ALL_TRUSTED,AWL 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; Wed, 05 May 2010 09:20:29 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 8DCE923889BF; Wed, 5 May 2010 09:19:39 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r941215 - /sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java Date: Wed, 05 May 2010 09:19:31 -0000 To: commits@sling.apache.org From: cziegeler@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100505091939.8DCE923889BF@eris.apache.org> Author: cziegeler Date: Wed May 5 09:19:30 2010 New Revision: 941215 URL: http://svn.apache.org/viewvc?rev=941215&view=rev Log: Slight improvement of the getProperty method Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java?rev=941215&r1=941214&r2=941215&view=diff ============================================================================== --- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java (original) +++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/JcrResourceResolver.java Wed May 5 09:19:30 2010 @@ -893,12 +893,14 @@ public class JcrResourceResolver new Object[] { res, propName, prop }); return prop; } - } - - // otherwise, check it in the jcr:content child resource - res = getResource(res, "jcr:content"); - if (res != null) { - return getProperty(res, propName); + // otherwise, check it in the jcr:content child resource + // This is a special case checking for JCR based resources + // we directly use the deep resolving of properties of the + // JCR value map implementation - this does not work + // in none JCR environments, however in non JCR envs there + // is usually no "jcr:content" child node anyway + prop = props.get("jcr:content/" + propName, String.class); + return prop; } return null;