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

new UncaughtExceptionHandler object with lambda

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.7.0
    • server
    • 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

            Unassigned Unassigned
            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