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

Manik Surtani msurtani at jboss.com
Thu Aug 24 12:30:10 EDT 2006


  User: msurtani
  Date: 06/08/24 12:30:10

  Modified:    src/org/jboss/cache/interceptors 
                        OptimisticValidatorInterceptor.java
  Log:
  fixed 
  - notifications with opt locking
  - single cache spi instance being created when using opt locking (in TreeCache)
  - added interceptor cache reference test
  
  Revision  Changes    Path
  1.31      +3 -3      JBossCache/src/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: OptimisticValidatorInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/interceptors/OptimisticValidatorInterceptor.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -b -r1.30 -r1.31
  --- OptimisticValidatorInterceptor.java	24 Aug 2006 14:57:52 -0000	1.30
  +++ OptimisticValidatorInterceptor.java	24 Aug 2006 16:30:10 -0000	1.31
  @@ -176,7 +176,7 @@
                   }
                   else
                   {
  -                    cache.getNotifier().notifyNodeRemoved(dNode.getFqn(), true, dNode.getData() == null ? null : Collections.unmodifiableMap(dNode.getData()));
  +                    cache.getNotifier().notifyNodeRemoved(dNode.getFqn(), true, dNode.getData() == null ? Collections.emptyMap() : Collections.unmodifiableMap(dNode.getData()));
                       DataNode parent = (DataNode) dNode.getParent();
                       parent.removeChild( dNode.getName() );
                       cache.getNotifier().notifyNodeRemoved(dNode.getFqn(), false, null);
  @@ -201,7 +201,7 @@
                       Map mergedData = wrappedNode.getMergedData();
                       boolean needsNotify = !dataEquals(mergedData, current.getData());
   
  -                    if (needsNotify) cache.getNotifier().notifyNodeModified(wrappedNode.getFqn(), true, wrappedNode.getData() == null ? null : Collections.unmodifiableMap(wrappedNode.getData()));
  +                    if (needsNotify) cache.getNotifier().notifyNodeModified(wrappedNode.getFqn(), true, current.getData() == null ? Collections.emptyMap() : Collections.unmodifiableMap(current.getData()));
   
                       current.put(mergedData, true);
                       if (workspace.isVersioningImplicit())
  @@ -215,7 +215,7 @@
                       }
                       if (trace) log.trace("Setting version of node " + current.getName() + " from " + wrappedNode.getVersion() + " to " + current.getVersion());
   
  -                    if (needsNotify) cache.getNotifier().notifyNodeModified(wrappedNode.getFqn(), false, mergedData == null ? null : Collections.unmodifiableMap(mergedData));
  +                    if (needsNotify) cache.getNotifier().notifyNodeModified(wrappedNode.getFqn(), false, mergedData == null ? Collections.emptyMap()  : Collections.unmodifiableMap(mergedData));
                   }
                   else
                   {
  
  
  



More information about the jboss-cvs-commits mailing list