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

Manik Surtani msurtani at jboss.com
Thu Dec 21 22:53:30 EST 2006


  User: msurtani
  Date: 06/12/21 22:53:30

  Modified:    src/org/jboss/cache  NodeImpl.java
  Log:
  fixed breakages
  
  Revision  Changes    Path
  1.30      +4 -5      JBossCache/src/org/jboss/cache/NodeImpl.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: NodeImpl.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/NodeImpl.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -b -r1.29 -r1.30
  --- NodeImpl.java	21 Dec 2006 13:11:57 -0000	1.29
  +++ NodeImpl.java	22 Dec 2006 03:53:30 -0000	1.30
  @@ -788,16 +788,15 @@
   
      public Set<Node> getChildren()
      {
  -      //return new ChildrenNodes<Node>(false);
         // strip out deleted child nodes...
  -      if (children == null || children.size() == 0) return new HashSet<Node>();
  +      if (children == null || children.size() == 0) return Collections.emptySet();
   
         Set<Node> exclDeleted = new HashSet<Node>();
         for (AbstractNode n : children.values())
         {
            if (!n.isDeleted()) exclDeleted.add(n);
         }
  -      return exclDeleted;
  +      return Collections.unmodifiableSet(exclDeleted);
      }
   
      public Set<Node> getChildren(boolean includeMarkedForRemoval)
  @@ -806,11 +805,11 @@
         {
            if (children != null && !children.isEmpty())
            {
  -            return new HashSet<Node>(children.values());
  +            return Collections.unmodifiableSet(new HashSet<Node>(children.values()));
            }
            else
            {
  -            return new HashSet<Node>();
  +            return Collections.emptySet();
            }
         }
         else
  
  
  



More information about the jboss-cvs-commits mailing list