@SuppressWarnings({"checkstyle:IllegalThrows", "checkstyle:avoidHidingCauseException"}) @Test(expected = ReadFailedException.class) public void existsTestWithException() throws Throwable { doThrow(new NullPointerException("no Node")).when(DATA_TREE_MODIFICATION).readNode(any()); try { snapshotBackedReadWriteTransaction.exists(YangInstanceIdentifier.empty()).get(); fail("Expected ReadFailedException"); } catch (ExecutionException e) { throw e.getCause(); } }
@SuppressWarnings("checkstyle:IllegalCatch") @Override public FluentFuture<Boolean> exists(final YangInstanceIdentifier path) { return read(path).transform(Optional::isPresent, MoreExecutors.directExecutor()); }
SnapshotBackedReadWriteTransaction extends
        SnapshotBackedWriteTransaction<T> implements DOMStoreReadWriteTransaction { @SuppressWarnings("checkstyle:IllegalCatch") @Override public FluentFuture<Boolean> exists(final YangInstanceIdentifier path) { return read(path).transform(Optional::isPresent, MoreExecutors.directExecutor()); } }
SnapshotBackedReadWriteTransaction extends
        SnapshotBackedWriteTransaction<T> implements DOMStoreReadWriteTransaction { @SuppressWarnings("checkstyle:IllegalCatch") @Override public FluentFuture<Boolean> exists(final YangInstanceIdentifier path) { return read(path).transform(Optional::isPresent, MoreExecutors.directExecutor()); } SnapshotBackedReadWriteTransaction(final T identifier, final boolean debug,
            final DataTreeSnapshot snapshot, final TransactionReadyPrototype<T> readyImpl); }
SnapshotBackedReadWriteTransaction extends
        SnapshotBackedWriteTransaction<T> implements DOMStoreReadWriteTransaction { @SuppressWarnings("checkstyle:IllegalCatch") @Override public FluentFuture<Boolean> exists(final YangInstanceIdentifier path) { return read(path).transform(Optional::isPresent, MoreExecutors.directExecutor()); } SnapshotBackedReadWriteTransaction(final T identifier, final boolean debug,
            final DataTreeSnapshot snapshot, final TransactionReadyPrototype<T> readyImpl); @SuppressWarnings("checkstyle:IllegalCatch") @Override FluentFuture<Optional<NormalizedNode<?,?>>> read(final YangInstanceIdentifier path); @SuppressWarnings("checkstyle:IllegalCatch") @Override FluentFuture<Boolean> exists(final YangInstanceIdentifier path); }
SnapshotBackedReadWriteTransaction extends
        SnapshotBackedWriteTransaction<T> implements DOMStoreReadWriteTransaction { @SuppressWarnings("checkstyle:IllegalCatch") @Override public FluentFuture<Boolean> exists(final YangInstanceIdentifier path) { return read(path).transform(Optional::isPresent, MoreExecutors.directExecutor()); } SnapshotBackedReadWriteTransaction(final T identifier, final boolean debug,
            final DataTreeSnapshot snapshot, final TransactionReadyPrototype<T> readyImpl); @SuppressWarnings("checkstyle:IllegalCatch") @Override FluentFuture<Optional<NormalizedNode<?,?>>> read(final YangInstanceIdentifier path); @SuppressWarnings("checkstyle:IllegalCatch") @Override FluentFuture<Boolean> exists(final YangInstanceIdentifier path);  }