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

Manik Surtani manik at jboss.org
Thu Mar 8 07:58:16 EST 2007


  User: msurtani
  Date: 07/03/08 07:58:16

  Modified:    src/org/jboss/cache/optimistic  WorkspaceNodeImpl.java
  Log:
  childrenMap now just a standard HashMap
  
  Revision  Changes    Path
  1.52      +4 -2      JBossCache/src/org/jboss/cache/optimistic/WorkspaceNodeImpl.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: WorkspaceNodeImpl.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/optimistic/WorkspaceNodeImpl.java,v
  retrieving revision 1.51
  retrieving revision 1.52
  diff -u -b -r1.51 -r1.52
  --- WorkspaceNodeImpl.java	7 Mar 2007 18:00:57 -0000	1.51
  +++ WorkspaceNodeImpl.java	8 Mar 2007 12:58:15 -0000	1.52
  @@ -23,7 +23,6 @@
   import java.util.List;
   import java.util.Map;
   import java.util.Set;
  -import java.util.concurrent.ConcurrentHashMap;
   
   /**
    * Wraps an ordinary {@link Node} and adds versioning and other meta data to it.
  @@ -62,7 +61,10 @@
         optimisticDataMap = new HashMap<Object, Object>(node.getDataDirect());
         Map<Object, Node> childrenMap = node.getChildrenMapDirect();
         // we NEED this null check otherwise the ConcurrentHashMap constructor could throw an NPE
  -      this.optimisticChildNodeMap = childrenMap == null ? new ConcurrentHashMap() : new ConcurrentHashMap(childrenMap);
  +      // could this not be a HashMap?  After all, each WNI is only used within a single Workspace, which is only
  +      // attached to a single transaction entry.
  +      //this.optimisticChildNodeMap = childrenMap == null ? new ConcurrentHashMap() : new ConcurrentHashMap(childrenMap);
  +      optimisticChildNodeMap = new HashMap(childrenMap);
         this.version = node.getVersion();
         if (version == null)
         {
  
  
  



More information about the jboss-cvs-commits mailing list