[jboss-cvs] JBossCache/src/org/jboss/cache ...

Manik Surtani manik at jboss.org
Tue Jul 17 10:10:21 EDT 2007


  User: msurtani
  Date: 07/07/17 10:10:21

  Modified:    src/org/jboss/cache  CacheImpl.java
  Log:
  JBCACHE-1136
  
  Revision  Changes    Path
  1.101     +18 -8     JBossCache/src/org/jboss/cache/CacheImpl.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CacheImpl.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/CacheImpl.java,v
  retrieving revision 1.100
  retrieving revision 1.101
  diff -u -b -r1.100 -r1.101
  --- CacheImpl.java	9 Jul 2007 14:46:02 -0000	1.100
  +++ CacheImpl.java	17 Jul 2007 14:10:21 -0000	1.101
  @@ -74,6 +74,7 @@
   import java.io.OutputStream;
   import java.lang.reflect.Method;
   import java.util.ArrayList;
  +import java.util.Collection;
   import java.util.Collections;
   import java.util.HashSet;
   import java.util.LinkedList;
  @@ -1817,8 +1818,17 @@
      {
         NodeSPI<K, V> n = findNode(fqn);
         if (n == null) return null;
  -      Set<E> s = (Set<E>) n.getChildrenNamesDirect();
  -      return s;
  +      Set childNames = new HashSet();
  +      Map childrenMap = n.getChildrenMapDirect();
  +      if (childrenMap == null || childrenMap.isEmpty()) return Collections.emptySet();
  +      Collection s = childrenMap.values();
  +      // prune deleted children - JBCACHE-1136
  +      for (Object c : s)
  +      {
  +         NodeSPI child = (NodeSPI) c;
  +         if (!child.isDeleted()) childNames.add(child.getFqn().getLastElement());
  +      }
  +      return childNames;
      }
   
      /**
  
  
  



More information about the jboss-cvs-commits mailing list