jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1524517 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/ItemImpl.java
Date Wed, 18 Sep 2013 18:22:03 GMT
Author: jukka
Date: Wed Sep 18 18:22:03 2013
New Revision: 1524517

URL: http://svn.apache.org/r1524517
Log:
OAK-141: issues related to Node.refresh() as opposed to Session.refresh()

Only log a warning for Item.refresh(false) calls as there the current implementation can cause
unsaved data to be lost.
For Item.refresh(true) there is no big problem in using Session.refresh(true) instead, as
the session could in any case auto-refresh at that point.

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/ItemImpl.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/ItemImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/ItemImpl.java?rev=1524517&r1=1524516&r2=1524517&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/ItemImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/session/ItemImpl.java
Wed Sep 18 18:22:03 2013
@@ -289,7 +289,9 @@ abstract class ItemImpl<T extends ItemDe
      */
     @Override
     public void refresh(final boolean keepChanges) throws RepositoryException {
-        log.warn("Item#refresh invokes Session#refresh!");
+        if (!keepChanges) {
+            log.warn("Item#refresh invokes Session#refresh!");
+        }
         perform(new SessionOperation<Void>() {
             @Override
             public Void perform() throws InvalidItemStateException {



Mime
View raw message