From 1326e9fa5cffe326b82aeee9d82d008526aff947 Mon Sep 17 00:00:00 2001 From: Maros Marsalek Date: Mon, 5 Sep 2016 12:10:26 +0200 Subject: Cleanup TODOs and FIXMEs - Fix minor ones - Report bigger and include issue number in comment - Pull common dependencies into dependency management of common/parents Change-Id: I06a6ac37c52b603fd73ed42023d6b2e7fa18010f Signed-off-by: Maros Marsalek --- .../java/io/fd/honeycomb/data/impl/ReadableDataTreeDelegator.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ReadableDataTreeDelegator.java') diff --git a/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ReadableDataTreeDelegator.java b/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ReadableDataTreeDelegator.java index 775f6326c..ae29fa08b 100644 --- a/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ReadableDataTreeDelegator.java +++ b/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ReadableDataTreeDelegator.java @@ -91,7 +91,7 @@ public final class ReadableDataTreeDelegator implements ReadableDataManager { org.opendaylight.controller.md.sal.common.api.data.ReadFailedException> read( @Nonnull final YangInstanceIdentifier yangInstanceIdentifier) { - try(TransactionMappingContext mappingContext = new TransactionMappingContext(contextBroker.newReadWriteTransaction()); + try (TransactionMappingContext mappingContext = new TransactionMappingContext(contextBroker.newReadWriteTransaction()); ReadContext ctx = new ReadContextImpl(mappingContext)) { final Optional> value; @@ -113,7 +113,8 @@ public final class ReadableDataTreeDelegator implements ReadableDataManager { return Futures.immediateFailedCheckedFuture( new org.opendaylight.controller.md.sal.common.api.data.ReadFailedException("Failed to read data", e)); } catch (TransactionCommitFailedException e) { - // FIXME revert should probably occur when context is not written successfully + // Context write failed. This should not happen, but if it does, there's not much that can be done here + // ... try to read again final String msg = "Error while updating mapping context data"; LOG.error(msg, e); return Futures.immediateFailedCheckedFuture( -- cgit 1.2.3-korg