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

Manik Surtani msurtani at jboss.com
Wed Jan 31 07:57:22 EST 2007


  User: msurtani
  Date: 07/01/31 07:57:22

  Modified:    src/org/jboss/cache/interceptors  Tag:
                        Branch_JBossCache_1_4_0
                        OptimisticValidatorInterceptor.java
  Log:
  Testing not checking DV types in prepare
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.25.2.13 +8 -4      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.12
  retrieving revision 1.25.2.13
  diff -u -b -r1.25.2.12 -r1.25.2.13
  --- OptimisticValidatorInterceptor.java	30 Jan 2007 22:23:50 -0000	1.25.2.12
  +++ OptimisticValidatorInterceptor.java	31 Jan 2007 12:57:22 -0000	1.25.2.13
  @@ -139,10 +139,14 @@
               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 (!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.
  +
                  if (realNode.getVersion().newerThan( workspaceNode.getVersion() ))
                  {
                      // we have an out of date node here
  
  
  



More information about the jboss-cvs-commits mailing list