On Wed, 2015-01-28 at 12:29 +0000, cziege...@apache.org wrote:
> Author: cziegeler
> Date: Wed Jan 28 12:29:44 2015
> New Revision: 1655278
> 
> URL: http://svn.apache.org/r1655278
> Log:
> Clarify lifetime of resource and resource resolver objects.
> 
> Modified:
>     
> sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/Resource.java
>     
> sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/ResourceResolver.java
> 
> Modified: 
> sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/Resource.java
> URL: 
> http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/Resource.java?rev=1655278&r1=1655277&r2=1655278&view=diff
> ==============================================================================
> --- 
> sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/Resource.java
>  (original)
> +++ 
> sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/Resource.java
>  Wed Jan 28 12:29:44 2015
> @@ -29,6 +29,11 @@ import aQute.bnd.annotation.ProviderType
>   * other types. A JCR based resource might support adapting to the JCR Node 
> on
>   * which the resource is based.
>   * <p>
> + * A <code>Resource</code> object is valid for as long as the
> + * <code>ResourceResolver</code> that provided this instance is valid. The
> + * same applies in general to all objects returned by this instance,
> + * especially those returned by a call to {@link #adaptTo(Class)}.
> + * <p>
>   * All implementations must support returning a value map from
>   * {@link #getValueMap()}, even if the map is empty.
>   * <p>
> 
> Modified: 
> sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/ResourceResolver.java
> URL: 
> http://svn.apache.org/viewvc/sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/ResourceResolver.java?rev=1655278&r1=1655277&r2=1655278&view=diff
> ==============================================================================
> --- 
> sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/ResourceResolver.java
>  (original)
> +++ 
> sling/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/ResourceResolver.java
>  Wed Jan 28 12:29:44 2015
> @@ -86,6 +86,12 @@ import aQute.bnd.annotation.ProviderType
>   * To check whether a Resource Resolver can still be used, the {@link 
> #isLive()}
>   * method can be called.
>   * <p>
> + * A <code>ResourceResolver</code> is only valid for as long as the
> + * <code>ResourceResolverFactory</code> that created this instance exists. 
> The
> + * same applies in general to all objects returned by this instance,
> + * especially for all instances. If the <code>ResourceResolverFactory</code>
> + * does not exist anymore, the resource resolver instances becomes invalid.
> + * <p>

Not sure what the above is supposed to mean:

        The same applies in general to all objects returned by this
        instance, especially for all instances
        
Robert




Reply via email to