jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1324887 - in /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr: RepositoryImpl.java SessionImpl.java
Date Wed, 11 Apr 2012 17:34:06 GMT
Author: mduerig
Date: Wed Apr 11 17:34:05 2012
New Revision: 1324887

URL: http://svn.apache.org/viewvc?rev=1324887&view=rev
Log:
OAK-15: Clean up oak-jcr
remove unnecessary constructor parameter

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/RepositoryImpl.java
    jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.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=1324887&r1=1324886&r2=1324887&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 Apr 11 17:34:05 2012
@@ -122,7 +122,7 @@ public class RepositoryImpl implements R
         RepositoryService service = context.getInstance(RepositoryService.class);
         try {
             Connection connection = service.login(credentials, workspaceName);
-            return new SessionImpl(context, this, connection);
+            return new SessionImpl(context, connection);
         } catch (LoginException e) {
             throw new javax.jcr.LoginException(e.getMessage());
         }

Modified: jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java?rev=1324887&r1=1324886&r2=1324887&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/SessionImpl.java
Wed Apr 11 17:34:05 2012
@@ -49,28 +49,24 @@ public class SessionImpl extends Abstrac
      */
     private static final Logger log = LoggerFactory.getLogger(SessionImpl.class);
 
-    private final Repository repository;
-    private final Workspace workspace;
+    private final GlobalContext globalContext;
     private final Connection connection;
     private final ValueFactory valueFactory;
-    private final GlobalContext globalContext;
+    private final Workspace workspace;
     private final SessionContext<SessionImpl> sessionContext = new Context();
     private boolean isAlive = true;
 
     private NodeStateEditor editor;
     private ItemStateProvider itemStateProvider;
 
-    SessionImpl(GlobalContext globalContext, Repository repository, Connection connection)
{
-
+    SessionImpl(GlobalContext globalContext, Connection connection) {
         this.globalContext = globalContext;
-        this.repository = repository;
         this.connection = connection;
         this.valueFactory = new ValueFactoryImpl();
+        workspace = new WorkspaceImpl(sessionContext);
 
         this.editor = connection.getNodeStateEditor(connection.getCurrentRoot());
         this.itemStateProvider = new ItemStateProvider(editor.getTransientState());
-
-        workspace = new WorkspaceImpl(sessionContext);
     }
 
 
@@ -78,7 +74,7 @@ public class SessionImpl extends Abstrac
 
     @Override
     public Repository getRepository() {
-        return repository;
+        return globalContext.getInstance(Repository.class);
     }
 
     @Override



Mime
View raw message