X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2FLocalTransactionFactoryImpl.java;h=d01cae8451451a0b5f35d5dc01f4fd10e789b932;hb=ef3b9a8300db1c791f2c4088d39152ccf9f5b97c;hp=7c05fef87fc6013aebeae533697fa6309bd9f8a8;hpb=c796596b5c46b5203c30b143e6282662e66c5642;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LocalTransactionFactoryImpl.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LocalTransactionFactoryImpl.java index 7c05fef87f..d01cae8451 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LocalTransactionFactoryImpl.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/LocalTransactionFactoryImpl.java @@ -66,16 +66,17 @@ final class LocalTransactionFactoryImpl extends TransactionReadyPrototype tx, - final DataTreeModification tree) { + protected DOMStoreThreePhaseCommitCohort transactionReady( + final SnapshotBackedWriteTransaction tx, final DataTreeModification tree) { return new LocalThreePhaseCommitCohort(actorContext, leader, tx, tree); } - @SuppressWarnings("unchecked") + @SuppressWarnings({"unchecked", "checkstyle:IllegalCatch"}) @Override public LocalThreePhaseCommitCohort onTransactionReady(@Nonnull DOMStoreWriteTransaction tx, @Nullable Exception operationError) { - if(operationError != null) { + Preconditions.checkArgument(tx instanceof SnapshotBackedWriteTransaction); + if (operationError != null) { return new LocalThreePhaseCommitCohort(actorContext, leader, (SnapshotBackedWriteTransaction)tx, operationError); }