You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2008/07/03 20:33:20 UTC
svn commit: r673754 -
/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java
Author: cziegeler
Date: Thu Jul 3 11:33:20 2008
New Revision: 673754
URL: http://svn.apache.org/viewvc?rev=673754&view=rev
Log:
Allow direct adaption to ValueMap.
Modified:
incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java
Modified: incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java
URL: http://svn.apache.org/viewvc/incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java?rev=673754&r1=673753&r2=673754&view=diff
==============================================================================
--- incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java (original)
+++ incubator/sling/trunk/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrNodeResource.java Thu Jul 3 11:33:20 2008
@@ -40,6 +40,7 @@
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceMetadata;
import org.apache.sling.api.resource.ResourceResolver;
+import org.apache.sling.api.resource.ValueMap;
import org.apache.sling.jcr.resource.JcrResourceTypeProvider;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -77,7 +78,7 @@
return (Type) getInputStream(); // unchecked cast
} else if (type == URL.class) {
return (Type) getURL(); // unchecked cast
- } else if (type == Map.class) {
+ } else if (type == Map.class || type == ValueMap.class) {
return (Type) new JcrPropertyMap(getNode()); // unchecked cast
}