[jboss-cvs] JBossCache/src/org/jboss/cache/interceptors ...
Manik Surtani
msurtani at jboss.com
Thu Nov 16 10:40:45 EST 2006
User: msurtani
Date: 06/11/16 10:40:45
Modified: src/org/jboss/cache/interceptors CacheStoreInterceptor.java
Log:
Added NP chk
Revision Changes Path
1.38 +12 -7 JBossCache/src/org/jboss/cache/interceptors/CacheStoreInterceptor.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: CacheStoreInterceptor.java
===================================================================
RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/CacheStoreInterceptor.java,v
retrieving revision 1.37
retrieving revision 1.38
diff -u -b -r1.37 -r1.38
--- CacheStoreInterceptor.java 13 Nov 2006 14:20:32 -0000 1.37
+++ CacheStoreInterceptor.java 16 Nov 2006 15:40:44 -0000 1.38
@@ -20,13 +20,14 @@
import java.util.Iterator;
import java.util.List;
import java.util.Map;
+import java.util.Set;
/**
* Writes modifications back to the store on the way out: stores modifications back
* through the CacheLoader, either after each method call (no TXs), or at TX commit.
*
* @author Bela Ban
- * @version $Id: CacheStoreInterceptor.java,v 1.37 2006/11/13 14:20:32 msurtani Exp $
+ * @version $Id: CacheStoreInterceptor.java,v 1.38 2006/11/16 15:40:44 msurtani Exp $
*/
public class CacheStoreInterceptor extends BaseCacheLoaderInterceptor implements CacheStoreInterceptorMBean
{
@@ -273,19 +274,23 @@
}
}
- private void recursiveMove(Fqn n, Fqn nn) throws Exception
+ private void recursiveMove(Fqn fqn, Fqn newFqn) throws Exception
{
List fqns = new ArrayList();
- fqns.add(n);
- fqns.add(nn);
+ fqns.add(fqn);
+ fqns.add(newFqn);
obtainLoaderLocks(fqns);
try
{
- loader.put(nn, loader.get(n));
+ loader.put(newFqn, loader.get(fqn));
//recurse
- for (Object child : loader.getChildrenNames(n))
+ Set childrenNames = loader.getChildrenNames(fqn);
+ if (childrenNames != null)
{
- recursiveMove(new Fqn(n, child), new Fqn(nn, child));
+ for (Object child : childrenNames)
+ {
+ recursiveMove(new Fqn(fqn, child), new Fqn(newFqn, child));
+ }
}
}
finally
More information about the jboss-cvs-commits
mailing list