jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1389868 - /jackrabbit/oak/trunk/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/RepositoryImpl.java
Date Tue, 25 Sep 2012 14:07:31 GMT
Author: mduerig
Date: Tue Sep 25 14:07:31 2012
New Revision: 1389868

URL: http://svn.apache.org/viewvc?rev=1389868&view=rev
Log:
trivial refactor

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=1389868&r1=1389867&r2=1389868&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
Tue Sep 25 14:07:31 2012
@@ -71,6 +71,11 @@ public class RepositoryImpl implements R
                     new UserValidatorProvider(new UserConfig("admin")),
                     new PrivilegeValidatorProvider());
 
+    private static final CompositeHook DEFAULT_COMMIT_HOOK =
+            new CompositeHook(
+                    new ValidatingHook(DEFAULT_VALIDATOR),
+                    new UniqueIndexHook());
+
     private final Descriptors descriptors = new Descriptors(new SimpleValueFactory());
     private final ContentRepository contentRepository;
 
@@ -85,10 +90,7 @@ public class RepositoryImpl implements R
 
     public RepositoryImpl(
             MicroKernel kernel, ScheduledExecutorService executor) {
-        this(new ContentRepositoryImpl(
-                kernel, null, new CompositeHook(
-                        new ValidatingHook(DEFAULT_VALIDATOR),
-                        new UniqueIndexHook())),
+        this(new ContentRepositoryImpl(kernel, null, DEFAULT_COMMIT_HOOK),
                 executor);
     }
 



Mime
View raw message