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

Manik Surtani msurtani at jboss.com
Fri Dec 15 12:30:32 EST 2006


  User: msurtani
  Date: 06/12/15 12:30:32

  Modified:    src/org/jboss/cache  NodeImpl.java
  Log:
  refactored
  
  Revision  Changes    Path
  1.26      +8 -26     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.25
  retrieving revision 1.26
  diff -u -b -r1.25 -r1.26
  --- NodeImpl.java	14 Dec 2006 17:18:47 -0000	1.25
  +++ NodeImpl.java	15 Dec 2006 17:30:32 -0000	1.26
  @@ -135,7 +135,7 @@
      /**
       * Initializes with a name and FQN and cache.
       */
  -   protected final void init(Object child_name, Fqn fqn, CacheSPI cache)
  +   private void init(Object child_name, Fqn fqn, CacheSPI cache)
      {
         if (cache == null)
         {
  @@ -169,7 +169,7 @@
         }
      }
   
  -   protected synchronized Map children()
  +   private synchronized Map children()
      {
         if (children == null)
         {
  @@ -225,11 +225,7 @@
   
      public synchronized boolean containsKey(Object key)
      {
  -      if (data == null)
  -      {
  -         return false;
  -      }
  -      return data.containsKey(key);
  +      return data != null && data.containsKey(key);
      }
   
      /**
  @@ -716,7 +712,7 @@
         }
      }
   
  -   public void printIndent(StringBuffer sb, int indent)
  +   private void printIndent(StringBuffer sb, int indent)
      {
         if (sb != null)
         {
  @@ -779,16 +775,12 @@
         {
            return null;
         }
  -      return children == null ? null : (DataNode) children.get(child_name);
  +      return children == null ? null : children.get(child_name);
      }
   
      public boolean childExists(Object child_name)
      {
  -      if (child_name == null)
  -      {
  -         return false;
  -      }
  -      return children != null && children.containsKey(child_name);
  +      return child_name != null && children != null && children.containsKey(child_name);
      }
   
      public Set<Node> getChildren()
  @@ -816,7 +808,7 @@
      /**
       * Adds details of the node into a map as strings.
       */
  -   protected void printDetailsInMap(StringBuffer sb, int indent)
  +   private void printDetailsInMap(StringBuffer sb, int indent)
      {
         printIndent(sb, indent);
         indent += 2;// increse it
  @@ -850,12 +842,6 @@
       */
      public void setDataLoaded(boolean dataLoaded)
      {
  -      // TODO remove this
  -      if (!dataLoaded && !data().isEmpty())
  -      {
  -         log.warn("data exists, but setDataLoaded(false)", new Throwable());
  -      }
  -
         this.dataLoaded = dataLoaded;
      }
   
  @@ -894,11 +880,7 @@
         @Override
         public boolean contains(Object o)
         {
  -         if (children == null)
  -         {
  -            return false;
  -         }
  -         return children.containsKey(o);
  +         return children != null && children.containsKey(o);
         }
   
         @Override
  
  
  



More information about the jboss-cvs-commits mailing list