Replace anonymous class with lambda Change-Id: I108852beaaaae3e354dd706641a451aec1e0f7f1
diff --git a/src/main/java/com/googlesource/gerrit/plugins/hooks/HookExecutor.java b/src/main/java/com/googlesource/gerrit/plugins/hooks/HookExecutor.java index c54009a..0232f9b 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/hooks/HookExecutor.java +++ b/src/main/java/com/googlesource/gerrit/plugins/hooks/HookExecutor.java
@@ -20,12 +20,8 @@ private static final FluentLogger logger = FluentLogger.forEnclosingClass(); private static final UncaughtExceptionHandler LOG_UNCAUGHT_EXCEPTION = - new UncaughtExceptionHandler() { - @Override - public void uncaughtException(Thread t, Throwable e) { + (t, e) -> logger.atSevere().withCause(e).log("HookExecutor thread %s threw exception", t.getName()); - } - }; private final ExecutorService threadPool; private final int timeout;