jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1456025 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/RepositoryImpl.java
Date Wed, 13 Mar 2013 16:24:39 GMT
Author: mduerig
Date: Wed Mar 13 16:24:39 2013
New Revision: 1456025

URL: http://svn.apache.org/r1456025
Log:
OAK-672: Avoid JCR APIs calling other JCR APIs
- Inline session refresh logic

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

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/RepositoryImpl.java?rev=1456025&r1=1456024&r2=1456025&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/RepositoryImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/RepositoryImpl.java
Wed Mar 13 16:24:39 2013
@@ -128,16 +128,13 @@ public class RepositoryImpl implements R
             SessionDelegate sessionDelegate = new SessionDelegate(contentSession) {
                 @Override
                 protected void refresh() {
-                    if (needsRefresh()) {
+                    // Refresh is always needed if this is an auto refresh session or there
+                    // are pending observation events
+                    if (autoRefresh || SessionContextProvider.hasPendingEvents(this)) {
                         refresh(true);
                     }
                 }
 
-                private boolean needsRefresh() {
-                    // Refresh is always needed if this is an auto refresh session or there
-                    // are pending observation events
-                    return autoRefresh || SessionContextProvider.hasPendingEvents(this);
-                }
             };
             return SessionContextProvider.newSession(sessionDelegate, this);
         } catch (LoginException e) {



Mime
View raw message