jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1447317 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core: ContentRepositoryImpl.java ContentSessionImpl.java
Date Mon, 18 Feb 2013 15:22:20 GMT
Author: angela
Date: Mon Feb 18 15:22:20 2013
New Revision: 1447317

URL: http://svn.apache.org/r1447317
Log:
minor improvement

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentRepositoryImpl.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentRepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentRepositoryImpl.java?rev=1447317&r1=1447316&r2=1447317&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentRepositoryImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentRepositoryImpl.java
Mon Feb 18 15:22:20 2013
@@ -32,17 +32,19 @@ import org.apache.jackrabbit.oak.spi.sec
 import org.apache.jackrabbit.oak.spi.security.authentication.LoginContextProvider;
 import org.apache.jackrabbit.oak.spi.state.NodeStore;
 
+import static com.google.common.base.Preconditions.checkNotNull;
+
 /**
  * {@code MicroKernel}-based implementation of
  * the {@link ContentRepository} interface.
  */
 public class ContentRepositoryImpl implements ContentRepository {
 
+    private final NodeStore nodeStore;
+    private final CommitHook commitHook;
     private final String defaultWorkspaceName;
     private final SecurityProvider securityProvider;
     private final QueryIndexProvider indexProvider;
-    private final NodeStore nodeStore;
-    private final CommitHook commitHook;
 
     /**
      * Creates an content repository instance based on the given, already
@@ -59,11 +61,11 @@ public class ContentRepositoryImpl imple
                                  @Nonnull String defaultWorkspaceName,
                                  @Nullable QueryIndexProvider indexProvider,
                                  @Nonnull SecurityProvider securityProvider) {
-        this.nodeStore = nodeStore;
-        this.commitHook = commitHook;
-        this.defaultWorkspaceName = defaultWorkspaceName;
+        this.nodeStore = checkNotNull(nodeStore);
+        this.commitHook = checkNotNull(commitHook);
+        this.defaultWorkspaceName = checkNotNull(defaultWorkspaceName);
+        this.securityProvider = checkNotNull(securityProvider);
         this.indexProvider = indexProvider != null ? indexProvider : new CompositeQueryIndexProvider();
-        this.securityProvider = securityProvider;
     }
 
     @Nonnull

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java?rev=1447317&r1=1447316&r2=1447317&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/core/ContentSessionImpl.java
Mon Feb 18 15:22:20 2013
@@ -51,9 +51,12 @@ class ContentSessionImpl implements Cont
 
     private volatile boolean live = true;
 
-    public ContentSessionImpl(LoginContext loginContext,
-                              SecurityProvider securityProvider, String workspaceName,
-                              NodeStore store, CommitHook hook, QueryIndexProvider indexProvider)
{
+    public ContentSessionImpl(@Nonnull LoginContext loginContext,
+                              @Nonnull SecurityProvider securityProvider,
+                              @Nonnull String workspaceName,
+                              @Nonnull NodeStore store,
+                              @Nonnull CommitHook hook,
+                              @Nonnull QueryIndexProvider indexProvider) {
         this.loginContext = loginContext;
         this.securityProvider = securityProvider;
         this.workspaceName = workspaceName;



Mime
View raw message