if ( newState != null ) if ( listeners.size() == 0 )
/** * Send an exception to any listeners, or else log the error if there are none. */ private void handleException(final Throwable e) { if ( errorListeners.size() == 0 ) { LOG.error("", e); } else { errorListeners.forEach(new Function<UnhandledErrorListener, Void>() { @Override public Void apply(UnhandledErrorListener listener) { try { listener.unhandledError("", e); } catch ( Exception e ) { ThreadUtils.checkInterrupted(e); LOG.error("Exception handling exception", e); } return null; } }); } }
if ( listeners.size() == 0 )