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

Manik Surtani msurtani at jboss.com
Sun Dec 10 12:02:38 EST 2006


  User: msurtani
  Date: 06/12/10 12:02:38

  Modified:    src/org/jboss/cache/interceptors  Tag:
                        Branch_JBossCache_1_4_0
                        OptimisticValidatorInterceptor.java
  Log:
  JBCACHE-894
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.25.2.9  +2 -2      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.25.2.8
  retrieving revision 1.25.2.9
  diff -u -b -r1.25.2.8 -r1.25.2.9
  --- OptimisticValidatorInterceptor.java	8 Dec 2006 12:04:04 -0000	1.25.2.8
  +++ OptimisticValidatorInterceptor.java	10 Dec 2006 17:02:38 -0000	1.25.2.9
  @@ -136,14 +136,14 @@
                 throw new DataVersioningException("Tx attempted to create " + fqn + " anew.  It has already been created since this tx started by another (possibly remote) tx.");
              }
   
  -            if (!workspaceNode.isCreated() )
  +            if (!workspaceNode.isCreated() && (workspaceNode.isDeleted() || workspaceNode.isDirty()))
               {
                  // test that the 2 DataVersion types match up
                  if (!realNode.getVersion().getClass().equals(workspaceNode.getVersion().getClass()) && checkNotInitialRootVersion(realNode))
                  {
                     throw new DataVersioningException("Attempting to apply data version of type " + workspaceNode.getVersion().getClass() + " to a node [fqn = "+realNode.getFqn()+"] that already contains version of type " + realNode.getVersion().getClass());                  
                  }
  -               if ((workspaceNode.isDeleted() || workspaceNode.isDirty()) && realNode.getVersion().newerThan( workspaceNode.getVersion() ))
  +               if (realNode.getVersion().newerThan( workspaceNode.getVersion() ))
                  {
                      // we have an out of date node here
                     throw new DataVersioningException("DataNode [" + fqn + "] version " + ((OptimisticTreeNode)workspaceNode.getNode()).getVersion() + " is newer than workspace node " + workspaceNode.getVersion());
  
  
  



More information about the jboss-cvs-commits mailing list