diff options
author | Brian S. O'Neill <bronee@gmail.com> | 2006-12-06 20:28:21 +0000 |
---|---|---|
committer | Brian S. O'Neill <bronee@gmail.com> | 2006-12-06 20:28:21 +0000 |
commit | df8eb2861e8ab9d6989bc369b95a44af1ca4394d (patch) | |
tree | af737882ecb78c9452d7fed2716460fbb220d02c /src/main/java/com/amazon/carbonado/spi | |
parent | 9fb03414506c055d3195debb78ad017094fcea97 (diff) |
Enhanced OptimisticLockException message.
Diffstat (limited to 'src/main/java/com/amazon/carbonado/spi')
-rw-r--r-- | src/main/java/com/amazon/carbonado/spi/MasterStorableGenerator.java | 8 |
1 files changed, 5 insertions, 3 deletions
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<S extends Storable> { // 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<S extends Storable> { 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();
}
|