@Test(expected = IllegalStateException.class) public void closeSubtransactionsTest() throws Exception { doThrow(UnsupportedOperationException.class).when(FAIL_TX1).close(); doThrow(UnsupportedOperationException.class).when(FAIL_TX2).close(); final AbstractDOMForwardedCompositeTransaction<?, ?> domForwardedCompositeTransaction = new DOMForwardedCompositeTransactionTestImpl("testIdent", ImmutableMap.of("testKey1", FAIL_TX1, "testKey2", FAIL_TX2)); domForwardedCompositeTransaction.closeSubtransactions(); }
@SuppressWarnings("checkstyle:IllegalCatch") protected void closeSubtransactions() { IllegalStateException failure = null; for (T subtransaction : backingTxs.values()) { try { subtransaction.close(); } catch (Exception e) { if (failure == null) { failure = new IllegalStateException("Uncaught exception occured during closing transaction", e); } else { failure.addSuppressed(e); } } } if (failure != null) { throw failure; } }
AbstractDOMForwardedCompositeTransaction implements
        DOMDataTreeTransaction { @SuppressWarnings("checkstyle:IllegalCatch") protected void closeSubtransactions() { IllegalStateException failure = null; for (T subtransaction : backingTxs.values()) { try { subtransaction.close(); } catch (Exception e) { if (failure == null) { failure = new IllegalStateException("Uncaught exception occured during closing transaction", e); } else { failure.addSuppressed(e); } } } if (failure != null) { throw failure; } } }
AbstractDOMForwardedCompositeTransaction implements
        DOMDataTreeTransaction { @SuppressWarnings("checkstyle:IllegalCatch") protected void closeSubtransactions() { IllegalStateException failure = null; for (T subtransaction : backingTxs.values()) { try { subtransaction.close(); } catch (Exception e) { if (failure == null) { failure = new IllegalStateException("Uncaught exception occured during closing transaction", e); } else { failure.addSuppressed(e); } } } if (failure != null) { throw failure; } } protected  AbstractDOMForwardedCompositeTransaction(final Object identifier, final Map<K, T> backingTxs); }
AbstractDOMForwardedCompositeTransaction implements
        DOMDataTreeTransaction { @SuppressWarnings("checkstyle:IllegalCatch") protected void closeSubtransactions() { IllegalStateException failure = null; for (T subtransaction : backingTxs.values()) { try { subtransaction.close(); } catch (Exception e) { if (failure == null) { failure = new IllegalStateException("Uncaught exception occured during closing transaction", e); } else { failure.addSuppressed(e); } } } if (failure != null) { throw failure; } } protected  AbstractDOMForwardedCompositeTransaction(final Object identifier, final Map<K, T> backingTxs); @Override Object getIdentifier(); }
AbstractDOMForwardedCompositeTransaction implements
        DOMDataTreeTransaction { @SuppressWarnings("checkstyle:IllegalCatch") protected void closeSubtransactions() { IllegalStateException failure = null; for (T subtransaction : backingTxs.values()) { try { subtransaction.close(); } catch (Exception e) { if (failure == null) { failure = new IllegalStateException("Uncaught exception occured during closing transaction", e); } else { failure.addSuppressed(e); } } } if (failure != null) { throw failure; } } protected  AbstractDOMForwardedCompositeTransaction(final Object identifier, final Map<K, T> backingTxs); @Override Object getIdentifier();  }