summaryrefslogtreecommitdiffstats
path: root/infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ReadableDataTreeDelegator.java
diff options
context:
space:
mode:
authorMaros Marsalek <mmarsale@cisco.com>2016-09-05 12:10:26 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-09-07 06:50:30 +0000
commit1326e9fa5cffe326b82aeee9d82d008526aff947 (patch)
treef8ca808f3aa3a9338573d8892b83305210a664a1 /infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ReadableDataTreeDelegator.java
parent6e77db8e850be8ad8a3d91bf43fb8986125ae60f (diff)
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 <mmarsale@cisco.com>
Diffstat (limited to 'infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ReadableDataTreeDelegator.java')
-rw-r--r--infra/data-impl/src/main/java/io/fd/honeycomb/data/impl/ReadableDataTreeDelegator.java5
1 files changed, 3 insertions, 2 deletions
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<NormalizedNode<?, ?>> 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(