[jboss-cvs] JBossAS SVN: r93501 - branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/entity.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Mon Sep 14 15:36:05 EDT 2009


Author: dereed
Date: 2009-09-14 15:36:05 -0400 (Mon, 14 Sep 2009)
New Revision: 93501

Modified:
   branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/entity/OptimisticJBCCache.java
Log:
[JBPAPP-2782] Fix OPTIMISTIC version check for EJB3 entities


Modified: branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/entity/OptimisticJBCCache.java
===================================================================
--- branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/entity/OptimisticJBCCache.java	2009-09-14 19:33:57 UTC (rev 93500)
+++ branches/JBPAPP_4_2_0_GA_CP/ejb3/src/main/org/jboss/ejb3/entity/OptimisticJBCCache.java	2009-09-14 19:36:05 UTC (rev 93501)
@@ -419,6 +419,11 @@
                return (other.previousVersion != null);
             }
             
+			// Can't be newer than itself
+			if ( this == dataVersion ) {
+				return false;
+			}
+
 			return versionComparator.compare( currentVersion, other.previousVersion ) >= 1;
 		}
 




More information about the jboss-cvs-commits mailing list