From commits-return-13557-apmail-jackrabbit-commits-archive=jackrabbit.apache.org@jackrabbit.apache.org Thu Jul 26 14:01:26 2012 Return-Path: X-Original-To: apmail-jackrabbit-commits-archive@www.apache.org Delivered-To: apmail-jackrabbit-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 572F19B88 for ; Thu, 26 Jul 2012 14:01:26 +0000 (UTC) Received: (qmail 96078 invoked by uid 500); 26 Jul 2012 14:01:26 -0000 Delivered-To: apmail-jackrabbit-commits-archive@jackrabbit.apache.org Received: (qmail 96019 invoked by uid 500); 26 Jul 2012 14:01:25 -0000 Mailing-List: contact commits-help@jackrabbit.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jackrabbit.apache.org Delivered-To: mailing list commits@jackrabbit.apache.org Received: (qmail 96010 invoked by uid 99); 26 Jul 2012 14:01:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jul 2012 14:01:25 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 26 Jul 2012 14:01:23 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 1490423888FD; Thu, 26 Jul 2012 14:00:39 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1366001 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java Date: Thu, 26 Jul 2012 14:00:39 -0000 To: commits@jackrabbit.apache.org From: reschke@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120726140039.1490423888FD@eris.apache.org> Author: reschke Date: Thu Jul 26 14:00:38 2012 New Revision: 1366001 URL: http://svn.apache.org/viewvc?rev=1366001&view=rev Log: JCR-2950: make the special case for root ID handle cases where there's no ACL on the root node as well Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java?rev=1366001&r1=1366000&r2=1366001&view=diff ============================================================================== --- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java (original) +++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java Thu Jul 26 14:00:38 2012 @@ -123,7 +123,7 @@ class CachingEntryCollector extends Entr */ private Entries internalUpdateCache(NodeImpl node) throws RepositoryException { Entries entries = super.getEntries(node); - if (cacheNoAcl || !entries.isEmpty()) { + if (cacheNoAcl || (isRootId(node.getNodeId()) && cache.specialCasesRoot()) || !entries.isEmpty()) { // adjust the 'nextId' to point to the next access controlled // ancestor node instead of the parent and remember the entries. entries.setNextId(getNextID(node)); @@ -369,6 +369,10 @@ class CachingEntryCollector extends Entr log.info("Root is special-cased: " + specialCaseRoot); } + public boolean specialCasesRoot() { + return specialCaseRoot; + } + public boolean containsKey(NodeId id) { if (specialCaseRoot && isRootId(id)) { return rootEntries != null;