[jboss-cvs] JBossAS SVN: r61012 - branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/entity.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Feb 28 13:54:04 EST 2007
Author: bstansberry at jboss.com
Date: 2007-02-28 13:54:04 -0500 (Wed, 28 Feb 2007)
New Revision: 61012
Modified:
branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/entity/OptimisticJBCCache.java
Log:
Avoid NPE is no version is used.
Modified: branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/entity/OptimisticJBCCache.java
===================================================================
--- branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/entity/OptimisticJBCCache.java 2007-02-28 18:37:22 UTC (rev 61011)
+++ branches/Branch_4_2/ejb3/src/main/org/jboss/ejb3/entity/OptimisticJBCCache.java 2007-02-28 18:54:04 UTC (rev 61012)
@@ -414,6 +414,15 @@
return false;
}
}
+
+ if (currentVersion == null)
+ {
+ // If the workspace node has null as well, OK; if not we've
+ // been modified in a non-comparable manner, which we have to
+ // treat as us being newer
+ return (other.previousVersion != null);
+ }
+
return versionComparator.compare( currentVersion, other.previousVersion ) >= 1;
}
More information about the jboss-cvs-commits
mailing list