incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jus...@apache.org
Subject svn commit: r1203949 - /sling/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrPropertyResource.java
Date Sat, 19 Nov 2011 02:31:01 GMT
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) {



Mime
View raw message