Return-Path: Delivered-To: apmail-jackrabbit-commits-archive@www.apache.org Received: (qmail 55871 invoked from network); 4 Aug 2010 15:13:50 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 4 Aug 2010 15:13:50 -0000 Received: (qmail 34332 invoked by uid 500); 4 Aug 2010 15:13:50 -0000 Delivered-To: apmail-jackrabbit-commits-archive@jackrabbit.apache.org Received: (qmail 34269 invoked by uid 500); 4 Aug 2010 15:13:49 -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 34262 invoked by uid 99); 4 Aug 2010 15:13:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Aug 2010 15:13:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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; Wed, 04 Aug 2010 15:13:47 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 85EA823888EC; Wed, 4 Aug 2010 15:12:29 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r982293 - in /jackrabbit/branches/2.1: ./ jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoCacheImpl.java Date: Wed, 04 Aug 2010 15:12:29 -0000 To: commits@jackrabbit.apache.org From: jukka@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100804151229.85EA823888EC@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jukka Date: Wed Aug 4 15:12:29 2010 New Revision: 982293 URL: http://svn.apache.org/viewvc?rev=982293&view=rev Log: 2.1: Merged revision 938099 (JCR-2616) Modified: jackrabbit/branches/2.1/ (props changed) jackrabbit/branches/2.1/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoCacheImpl.java Propchange: jackrabbit/branches/2.1/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Wed Aug 4 15:12:29 2010 @@ -2,4 +2,4 @@ /jackrabbit/sandbox/JCR-1456:774917-886178 /jackrabbit/sandbox/JCR-2170:812417-816332 /jackrabbit/sandbox/tripod-JCR-2209:795441-795863 -/jackrabbit/trunk:931121,931479,931483-931484,931504,931609,931613,931838,931919,932318-932319,933144,933197,933203,933213,933216,933554,933646,933694,934405,934412,934849,935557,936668,955222,955229,955307,964362,965539 +/jackrabbit/trunk:931121,931479,931483-931484,931504,931609,931613,931838,931919,932318-932319,933144,933197,933203,933213,933216,933554,933646,933694,934405,934412,934849,935557,936668,938099,955222,955229,955307,964362,965539 Modified: jackrabbit/branches/2.1/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoCacheImpl.java URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.1/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoCacheImpl.java?rev=982293&r1=982292&r2=982293&view=diff ============================================================================== --- jackrabbit/branches/2.1/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoCacheImpl.java (original) +++ jackrabbit/branches/2.1/jackrabbit-spi-commons/src/main/java/org/apache/jackrabbit/spi/commons/ItemInfoCacheImpl.java Wed Aug 4 15:12:29 2010 @@ -31,8 +31,8 @@ import org.apache.jackrabbit.spi.Reposit * Item infos are put into the cache after they have been read from the {@link RepositoryService}. * If the cache is full, the oldest item is discared. Reading items removes the from the cache. * - * The undrlying idea here is, that {@link ItemInfo}s which are supplied by the - * RepositoryService but not immediatly needed are put into the cache to avoid further + * The underlying idea here is, that {@link ItemInfo}s which are supplied by the + * RepositoryService but not immediately needed are put into the cache to avoid further * round trips to RepositoryService. When they are needed later, they are read * from the cache. There is no need to keep them in this cache after that point since they are * present in the hierarchy from then on. @@ -75,6 +75,9 @@ public class ItemInfoCacheImpl implement Object entry = entries.remove(nodeId); if (entry == null) { entry = entries.remove(nodeId.getPath()); + } else { + // there might be a corresponding path-indexed entry, clear it as well + entries.remove(node(entry).info.getPath()); } return node(entry); @@ -90,6 +93,9 @@ public class ItemInfoCacheImpl implement Object entry = entries.remove(propertyId); if (entry == null) { entry = entries.remove(propertyId.getPath()); + } else { + // there might be a corresponding path-indexed entry, clear it as well + entries.remove(property(entry).info.getPath()); } return property(entry); @@ -97,7 +103,7 @@ public class ItemInfoCacheImpl implement /** * This implementation cached the item by its id and if the id - * id uuid based but has no path, also by its path. + * is uuid based but has no path, also by its path. */ public void put(ItemInfo info, long generation) { ItemId id = info.getId();