Description
old
public class ZooKeeperThread extends Thread { private static final Logger LOG = LoggerFactory.getLogger(ZooKeeperThread.class); private UncaughtExceptionHandler uncaughtExceptionalHandler = new UncaughtExceptionHandler() { @Override public void uncaughtException(Thread t, Throwable e) { handleException(t.getName(), e); } };
new
public class ZooKeeperThread extends Thread { private static final Logger LOG = LoggerFactory.getLogger(ZooKeeperThread.class); private UncaughtExceptionHandler uncaughtExceptionalHandler = (t, e) -> handleException(t.getName(), e);