jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r1342654 - /jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/core/MicroKernelImpl.java
Date Fri, 25 May 2012 14:45:28 GMT
Author: stefan
Date: Fri May 25 14:45:27 2012
New Revision: 1342654

URL: http://svn.apache.org/viewvc?rev=1342654&view=rev
Log:
OAK-75: specify format and semantics of 'filter' parameter in MicroKernel API:

 :hash must be excplicitly enabled in the filter

Modified:
    jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/core/MicroKernelImpl.java

Modified: jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/core/MicroKernelImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/core/MicroKernelImpl.java?rev=1342654&r1=1342653&r2=1342654&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/core/MicroKernelImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-mk/src/main/java/org/apache/jackrabbit/mk/core/MicroKernelImpl.java
Fri May 25 14:45:27 2012
@@ -555,10 +555,14 @@ public class MicroKernelImpl implements 
                 // unless it is explicitly excluded in the filter
                 builder.key(":childNodeCount").value(childCount);
             }
-            // TODO check whether :hash has been explicitly included
-            if (filter != null && filter.includeProperty(":hash")) {
-                // :hash must be explicitly included in the filter
-                builder.key(":hash").value(rep.getRevisionStore().getId(node).toString());
+            // check whether :hash has been explicitly included
+            if (filter != null) {
+                NameFilter nf = filter.getPropertyFilter();
+                if (nf != null
+                        && nf.getInclusionPatterns().contains(":hash")
+                        && !nf.getExclusionPatterns().contains(":hash")) {
+                    builder.key(":hash").value(rep.getRevisionStore().getId(node).toString());
+                }
             }
         }
         if (childCount > 0 && depth >= 0) {



Mime
View raw message