Ejemplo n.º 1
0
    public static void afterExecute(Runnable runnable, Throwable throwable, Thread.UncaughtExceptionHandler uncaughtexceptionhandler)
    {
        Object obj;
        if (uncaughtexceptionhandler != null)
        {
            Thread.currentThread().setUncaughtExceptionHandler(uncaughtexceptionhandler);
        }
        obj = null;
        if (throwable != null)
        {
            break MISSING_BLOCK_LABEL_51;
        }
        throwable = obj;
        if (!(runnable instanceof Future))
        {
            break MISSING_BLOCK_LABEL_51;
        }
        runnable = (Future)runnable;
        throwable = obj;
        if (!runnable.isDone())
        {
            break MISSING_BLOCK_LABEL_51;
        }
        runnable.get();
        throwable = obj;
_L2:
        if (throwable != null)
        {
            log.error("afterExecute", "unexpected exception", new Object[] {
                "thread", Thread.currentThread().getName(), throwable
            });
            if (uncaughtexceptionhandler != null)
            {
                uncaughtexceptionhandler.uncaughtException(Thread.currentThread(), throwable);
            }
        }
        return;
        runnable;
        log.debug("afterExecute", "hit CancellationException on this thread, this  is expected if you canceled a task", new Object[] {
            "thread", Thread.currentThread().getName()
        });
        throwable = obj;
        continue; /* Loop/switch isn't completed */
        runnable;
        throwable = runnable.getCause();
        continue; /* Loop/switch isn't completed */
        runnable;
        log.verbose("afterExecute", "interrupted", new Object[0]);
        Thread.currentThread().interrupt();
        throwable = obj;
        if (true) goto _L2; else goto _L1