Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-3883

new UncaughtExceptionHandler object with lambda

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.7.0
    • Component/s: server
    • Labels:
      None

      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);
      
      

       

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              ZWShuai91 wenshuai.zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 10m
                1h 10m