summaryrefslogtreecommitdiffstats
path: root/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppConfigDataTree.java
diff options
context:
space:
mode:
Diffstat (limited to 'v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppConfigDataTree.java')
-rw-r--r--v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppConfigDataTree.java4
1 files changed, 1 insertions, 3 deletions
diff --git a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppConfigDataTree.java b/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppConfigDataTree.java
index 9f34fcbd1..1982bc707 100644
--- a/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppConfigDataTree.java
+++ b/v3po/impl/src/main/java/io/fd/honeycomb/v3po/impl/data/VppConfigDataTree.java
@@ -107,9 +107,7 @@ public final class VppConfigDataTree implements VppDataTree {
final DOMDataReadOnlyTransaction beforeTx = new VppReadOnlyTransaction(EMPTY_OPERATIONAL, takeSnapshot());
final ConfigSnapshot modificationSnapshot = new ConfigSnapshot(modification);
final DOMDataReadOnlyTransaction afterTx = new VppReadOnlyTransaction(EMPTY_OPERATIONAL, modificationSnapshot);
- final WriteContext ctx = new TransactionWriteContext(serializer, beforeTx, afterTx);
-
- try {
+ try(final WriteContext ctx = new TransactionWriteContext(serializer, beforeTx, afterTx)) {
writer.update(nodesBefore, nodesAfter, ctx);
} catch (WriterRegistry.BulkUpdateException e) {
LOG.warn("Failed to apply all changes", e);