From df8eb2861e8ab9d6989bc369b95a44af1ca4394d Mon Sep 17 00:00:00 2001 From: "Brian S. O'Neill" Date: Wed, 6 Dec 2006 20:28:21 +0000 Subject: Enhanced OptimisticLockException message. --- .../java/com/amazon/carbonado/spi/MasterStorableGenerator.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/amazon/carbonado/spi') diff --git a/src/main/java/com/amazon/carbonado/spi/MasterStorableGenerator.java b/src/main/java/com/amazon/carbonado/spi/MasterStorableGenerator.java index 11657de..b3bc830 100644 --- a/src/main/java/com/amazon/carbonado/spi/MasterStorableGenerator.java +++ b/src/main/java/com/amazon/carbonado/spi/MasterStorableGenerator.java @@ -546,7 +546,7 @@ public final class MasterStorableGenerator { // if (version support enabled) { // if (this.getVersionNumber() != saved.getVersionNumber()) { // throw new OptimisticLockException - // (this.getVersionNumber(), saved.getVersionNumber()); + // (this.getVersionNumber(), saved.getVersionNumber(), this); // } // } if (mFeatures.contains(MasterFeature.VERSIONING)) { @@ -565,8 +565,10 @@ public final class MasterStorableGenerator { b.loadLocal(savedVar); b.invoke(mInfo.getVersionProperty().getReadMethod()); b.convert(versionType, TypeDesc.OBJECT); - b.invokeConstructor(optimisticLockType, - new TypeDesc[] {TypeDesc.OBJECT, TypeDesc.OBJECT}); + b.loadThis(); + b.invokeConstructor + (optimisticLockType, + new TypeDesc[] {TypeDesc.OBJECT, TypeDesc.OBJECT, storableType}); b.throwObject(); sameVersion.setLocation(); } -- cgit v1.2.3