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;