[HHH-4435] newerThan should return false when comparing to self

git-svn-id: https://svn.jboss.org/repos/hibernate/core/trunk@17634 1b8cb986-b30d-0410-93ca-fae66ebed9b2
This commit is contained in:
Brian Stansberry 2009-10-06 18:17:00 +00:00
parent 06491edd23
commit 9cfcc990f2
1 changed files with 5 additions and 0 deletions

View File

@ -116,6 +116,11 @@ public class DataVersionAdapter implements DataVersion {
// treat as us being newer
return (other.previousVersion != null);
}
// Can't be newer than itself
if ( this == dataVersion ) {
return false;
}
return versionComparator.compare(currentVersion, other.previousVersion) >= 1;
}