openjpa-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p..@apache.org
Subject svn commit: r633744 - /openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java
Date Wed, 05 Mar 2008 01:29:58 GMT
Author: pcl
Date: Tue Mar  4 17:29:56 2008
New Revision: 633744

URL: http://svn.apache.org/viewvc?rev=633744&view=rev
Log:
Merge from ../../trunk. svn merge -c 633739 ../../trunk

Modified:
    openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java

Modified: openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java
URL: http://svn.apache.org/viewvc/openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java?rev=633744&r1=633743&r2=633744&view=diff
==============================================================================
--- openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java
(original)
+++ openjpa/branches/1.0.x/openjpa-kernel/src/main/java/org/apache/openjpa/datacache/QueryCacheStoreQuery.java
Tue Mar  4 17:29:56 2008
@@ -128,6 +128,9 @@
             // using it because of the individual by-oid lookups
             ClassMetaData meta = _repos.getMetaData(getContext().
                 getCandidateType(), _sctx.getClassLoader(), true);
+            if (meta.getDataCache() == null)
+                return null;
+
             BitSet idxs = meta.getDataCache().containsAll(res);
 
             // eventually we should optimize this to figure out how many objects
@@ -333,9 +336,11 @@
                 (q.getContext(), classes));
 
             // evict from the data cache
-            for (int i = 0; i < cmd.length; i++)
-                cmd[i].getDataCache().removeAll(
-                    cmd[i].getDescribedType(), true);
+            for (int i = 0; i < cmd.length; i++) {
+                if (cmd[i].getDataCache() != null)
+                    cmd[i].getDataCache().removeAll(
+                        cmd[i].getDescribedType(), true);
+            }
         }
 
         public Number executeDelete(StoreQuery q, Object[] params) {



Mime
View raw message