Optional<T> data;
try {
final CheckedFuture<Optional<T>, ReadFailedException> futureData =
rTx.read(datastoreType, iid);
data = futureData.get();
<BUG>LOG.trace("Netconf READ transaction done. Data present: {}, Retry counter: {}",

data.isPresent(), retryCounter);</BUG>
return data;
<BUG>} catch (IllegalStateException e) {
if (retryCounter > 0) {
LOG.warn("Assuming that netconf read-transaction failed, restarting ...", e.getMessage());
rTx.close();</BUG>
return read(mountpoint, datastoreType, iid, --retryCounter);

Optional<T> data;
try {
final CheckedFuture<Optional<T>, ReadFailedException> futureData =
rTx.read(datastoreType, iid);
data = futureData.get();
LOG.trace("Netconf READ transaction done. Data present: {}", data.isPresent());
return data;
} catch (Exception e) {
if (retryCounter > 0) {
LOG.warn("Netconf READ transaction failed to {}. Restarting transaction ... ", e.getMessage());
rTx.close();
return read(mountpoint, datastoreType, iid, --retryCounter);
