Hi everyone,

the javadocs of ResourceResolver.copy/move() [1] aren't very clear whether 
these methods immediately persist the change, or if the change is transient and 
it's necessary to call commit().

The implementation of the JCR resource provider uses Session.move() which is 
transient.

When copy and move works across different providers, I wonder if transient is 
still supposed to work. It seems, but would be good to clarify this.

In fact, no other modifying method mentions commit(), nor does the class level 
javadoc.

[1] 
https://github.com/apache/sling/blob/trunk/bundles/api/src/main/java/org/apache/sling/api/resource/ResourceResolver.java#L727-L781
[2] 
https://github.com/apache/sling/blob/trunk/bundles/jcr/resource/src/main/java/org/apache/sling/jcr/resource/internal/helper/jcr/JcrResourceProvider.java#L554

Cheers,
Alex

Reply via email to