wenshuai.zhang created ZOOKEEPER-3883:
-----------------------------------------
Summary: new UncaughtExceptionHandler object with lambda
Key: ZOOKEEPER-3883
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3883
Project: ZooKeeper
Issue Type: Improvement
Components: server
Reporter: wenshuai.zhang
old
{code:java}
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);
}
};
{code}
new
{code:java}
public class ZooKeeperThread extends Thread {
private static final Logger LOG =
LoggerFactory.getLogger(ZooKeeperThread.class);
private UncaughtExceptionHandler uncaughtExceptionalHandler = (t, e) ->
handleException(t.getName(), e);
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)