You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ju...@apache.org on 2011/11/19 03:31:01 UTC

svn commit: r1203949 - /sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrPropertyResource.java

Author: justin
Date: Sat Nov 19 02:31:01 2011
New Revision: 1203949

URL: http://svn.apache.org/viewvc?rev=1203949&view=rev
Log:
SLING-2294 - JcrPropertyResource should be adaptable to a Node if the property type is WeakReference

Modified:
    sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrPropertyResource.java

Modified: sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrPropertyResource.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrPropertyResource.java?rev=1203949&r1=1203948&r2=1203949&view=diff
==============================================================================
--- sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrPropertyResource.java (original)
+++ sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrPropertyResource.java Sat Nov 19 02:31:01 2011
@@ -96,7 +96,8 @@ class JcrPropertyResource extends JcrIte
                 return (AdapterType) getProperty().getValue();
 
             } else if (type == Node.class
-                && getProperty().getType() == PropertyType.REFERENCE) {
+                && (getProperty().getType() == PropertyType.REFERENCE ||
+                    getProperty().getType() == PropertyType.WEAKREFERENCE)) {
                 return (AdapterType) getProperty().getNode();
 
             } else if (type == InputStream.class) {