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

Manik Surtani msurtani at jboss.com
Wed Jan 31 08:05:44 EST 2007


  User: msurtani
  Date: 07/01/31 08:05:44

  Modified:    src/org/jboss/cache/interceptors  Tag:
                        Branch_JBossCache_1_4_0
                        OptimisticValidatorInterceptor.java
  Log:
  DV checks changed
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.25.2.14 +2 -13     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.13
  retrieving revision 1.25.2.14
  diff -u -b -r1.25.2.13 -r1.25.2.14
  --- OptimisticValidatorInterceptor.java	31 Jan 2007 12:57:22 -0000	1.25.2.13
  +++ OptimisticValidatorInterceptor.java	31 Jan 2007 13:05:44 -0000	1.25.2.14
  @@ -138,14 +138,8 @@
   
               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());
  -//               }
  -
  -               // let's not type-check the versions here.  Assume that the newerThan() method will do any type checking
  -               // internally, if necessary, and barf accordingly.
  +               // newerThan() will internally test if the DataVersion types being compared tally up, and will barf if
  +               // necessary with an appropriate DataVersioningException.
   
                  if (realNode.getVersion().newerThan( workspaceNode.getVersion() ))
                  {
  @@ -156,11 +150,6 @@
           }
       }
   
  -   private boolean checkNotInitialRootVersion(OptimisticTreeNode n)
  -   {
  -      return !n.getFqn().isRoot() || !(n.getVersion() instanceof DefaultDataVersion) || n.getVersion() != DefaultDataVersion.ZERO;
  -   }
  -
       private void commit(GlobalTransaction gtx)
       {
           TransactionWorkspace workspace;
  
  
  



More information about the jboss-cvs-commits mailing list