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

Manik Surtani msurtani at jboss.com
Thu Feb 22 03:21:03 EST 2007


  User: msurtani
  Date: 07/02/22 03:21:03

  Modified:    src/org/jboss/cache/optimistic  WorkspaceNodeImpl.java
  Log:
  - fixed NPE with ConcurrentHashMap construction
  
  Revision  Changes    Path
  1.50      +1 -0      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.49
  retrieving revision 1.50
  diff -u -b -r1.49 -r1.50
  --- WorkspaceNodeImpl.java	22 Feb 2007 07:01:32 -0000	1.49
  +++ WorkspaceNodeImpl.java	22 Feb 2007 08:21:03 -0000	1.50
  @@ -56,6 +56,7 @@
         this.workspace = workspace;
         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);
         this.version = node.getVersion();
         if (version == null)
  
  
  



More information about the jboss-cvs-commits mailing list