jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r620855 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DocNumberCache.java
Date Tue, 12 Feb 2008 16:39:19 GMT
Author: mreutegg
Date: Tue Feb 12 08:39:18 2008
New Revision: 620855

URL: http://svn.apache.org/viewvc?rev=620855&view=rev
Log:
JCR-1377: Reduce memory usage of DocNumberCache
- fix regression

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DocNumberCache.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DocNumberCache.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DocNumberCache.java?rev=620855&r1=620854&r2=620855&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DocNumberCache.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/query/lucene/DocNumberCache.java
Tue Feb 12 08:39:18 2008
@@ -128,6 +128,10 @@
      */
     Entry get(String uuid) {
         LRUMap cacheSegment = docNumbers[getSegmentIndex(uuid.charAt(0))];
+        // uuid may be invalid
+        if (uuid.length() != UUID.UUID_FORMATTED_LENGTH) {
+            return null;
+        }
         UUID key = UUID.fromString(uuid);
         Entry entry;
         synchronized (cacheSegment) {



Mime
View raw message