-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
11, 12, 13
-
x86_64
-
linux
ADDITIONAL SYSTEM INFORMATION :
All OS and JDK 1.5 to current JDK12.
A DESCRIPTION OF THE PROBLEM :
ThreadPoolExecutor/Callable silently ignore all uncaught exception unless Future.get() is called.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run code below.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Some output to indicate uncaught exception.
ACTUAL -
Silent ignore.
---------- BEGIN SOURCE ----------
new ThreadPoolExecutor(1, 1, 2, TimeUnit.MINUTES, new LinkedBlockingDeque<Runnable>(10))
.submit(new Callable<Object>() {
@Override
public Object call() throws Exception {
throw new RuntimeException();
}
});
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Developer must remember to call Future.get(), otherwise threadpool silently ignore all uncaught exception.
FREQUENCY : always
All OS and JDK 1.5 to current JDK12.
A DESCRIPTION OF THE PROBLEM :
ThreadPoolExecutor/Callable silently ignore all uncaught exception unless Future.get() is called.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run code below.
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Some output to indicate uncaught exception.
ACTUAL -
Silent ignore.
---------- BEGIN SOURCE ----------
new ThreadPoolExecutor(1, 1, 2, TimeUnit.MINUTES, new LinkedBlockingDeque<Runnable>(10))
.submit(new Callable<Object>() {
@Override
public Object call() throws Exception {
throw new RuntimeException();
}
});
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Developer must remember to call Future.get(), otherwise threadpool silently ignore all uncaught exception.
FREQUENCY : always
- relates to
-
JDK-7176957 ExecutorService submit method javaDoc enhancement
-
- Open
-
-
JDK-7178766 Executor Service exceptions propagate to uncaught exception handler
-
- Closed
-