@Override protected void shutDown() throws Exception { super.shutDown(); Exception failure = null; try { logAppenderInitializer.close(); } catch (Exception e) { failure = e; } for (Service service : (Iterable<Service>) coreServices::descendingIterator) { try { service.stopAndWait(); } catch (Exception e) { if (failure != null) { failure.addSuppressed(e); } else { failure = e; } } } if (failure != null) { throw failure; } }
@Override protected void shutDown() throws Exception { super.shutDown(); Exception failure = null; try { logAppenderInitializer.close(); } catch (Exception e) { failure = e; } for (Service service : (Iterable<Service>) coreServices::descendingIterator) { try { service.stopAndWait(); } catch (Exception e) { if (failure != null) { failure.addSuppressed(e); } else { failure = e; } } } if (failure != null) { throw failure; } }