@Override public void close() { super.close(); // destroy all of the ProgramLifeCycles registered RuntimeException ex = null; for (ProgramLifecycle programLifecycle : programLifecycles) { try { programLifecycle.destroy(); } catch (RuntimeException e) { if (ex == null) { ex = new RuntimeException(e); } else { ex.addSuppressed(e); } } } if (ex != null) { throw ex; } }
@Override public void close() { super.close(); // destroy all of the ProgramLifeCycles registered RuntimeException ex = null; for (ProgramLifecycle programLifecycle : programLifecycles) { try { programLifecycle.destroy(); } catch (RuntimeException e) { if (ex == null) { ex = new RuntimeException(e); } else { ex.addSuppressed(e); } } } if (ex != null) { throw ex; } }