From: Robert Varga Date: Fri, 25 Oct 2024 12:46:43 +0000 (+0200) Subject: Eliminate another prepareBatchedModifications() method X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F90%2F114190%2F1;p=controller.git Eliminate another prepareBatchedModifications() method We are using this method only indirectly, merge it into its sole caller. Change-Id: Ic414449778eead545cfbf7b713a307b8f0e429f4 Signed-off-by: Robert Varga --- diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractShardTest.java b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractShardTest.java index 2ed397cdac..88a564f832 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractShardTest.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/AbstractShardTest.java @@ -256,9 +256,10 @@ public abstract class AbstractShardTest extends AbstractActorTest { } protected static BatchedModifications prepareBatchedModifications(final TransactionIdentifier transactionID, - final MutableCompositeModification modification, - final boolean doCommitOnReady) { - final BatchedModifications batchedModifications = new BatchedModifications(transactionID, CURRENT_VERSION); + final YangInstanceIdentifier path, final NormalizedNode data, final boolean doCommitOnReady) { + final var modification = new MutableCompositeModification(); + modification.addModification(new WriteModification(path, data)); + final var batchedModifications = new BatchedModifications(transactionID, CURRENT_VERSION); batchedModifications.addModification(modification); batchedModifications.setReady(); batchedModifications.setDoCommitOnReady(doCommitOnReady); @@ -266,13 +267,6 @@ public abstract class AbstractShardTest extends AbstractActorTest { return batchedModifications; } - protected static BatchedModifications prepareBatchedModifications(final TransactionIdentifier transactionID, - final YangInstanceIdentifier path, final NormalizedNode data, final boolean doCommitOnReady) { - final MutableCompositeModification modification = new MutableCompositeModification(); - modification.addModification(new WriteModification(path, data)); - return prepareBatchedModifications(transactionID, modification, doCommitOnReady); - } - protected static ForwardedReadyTransaction prepareForwardedReadyTransaction(final TestActorRef shard, final TransactionIdentifier transactionID, final YangInstanceIdentifier path, final NormalizedNode data, final boolean doCommitOnReady) {