diff options
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();
}
|