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

Manik Surtani msurtani at jboss.com
Wed Jan 31 11:44:29 EST 2007


  User: msurtani
  Date: 07/01/31 11:44:29

  Modified:    src/org/jboss/cache/optimistic   DataVersion.java
                        DefaultDataVersion.java
  Log:
  JBCACHE-962
  
  Revision  Changes    Path
  1.4       +3 -1      JBossCache/src/org/jboss/cache/optimistic/DataVersion.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: DataVersion.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/optimistic/DataVersion.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- DataVersion.java	29 Dec 2006 15:11:16 -0000	1.3
  +++ DataVersion.java	31 Jan 2007 16:44:29 -0000	1.4
  @@ -22,7 +22,9 @@
   public interface DataVersion extends Serializable
   {
      /**
  -    * Returns true if this is a newer version than <code>other</code>.
  +    * Returns true if this is a newer version than <code>other</code>.  There is no guarantee that the DataVersion passed
  +    * in is of the same implementation as the current instance.  The implementation will have to check for this (if necessary)
  +    * and (if necessary) throw a {@link org.jboss.cache.optimistic.DataVersioningException}. 
       */
      public boolean newerThan(DataVersion other);
   }
  
  
  
  1.8       +1 -1      JBossCache/src/org/jboss/cache/optimistic/DefaultDataVersion.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: DefaultDataVersion.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/src/org/jboss/cache/optimistic/DefaultDataVersion.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -b -r1.7 -r1.8
  --- DefaultDataVersion.java	29 Dec 2006 15:18:20 -0000	1.7
  +++ DefaultDataVersion.java	31 Jan 2007 16:44:29 -0000	1.8
  @@ -76,7 +76,7 @@
            DefaultDataVersion dvOther = (DefaultDataVersion) other;
            return version > dvOther.version;
         }
  -      return false;
  +      throw new DataVersioningException("Attempting to compare a custom data version (type " + other.getClass() + ") with a DefaultDataVersion instance.  Don't know how to compare!");
      }
   
      public String toString()
  
  
  



More information about the jboss-cvs-commits mailing list