-
Bug
-
Resolution: Fixed
-
P3
-
5.0
-
b42
-
generic, sparc
-
generic, solaris_2.1
Doug Lea writes:
Problem: ScheduledThreadPoolExecutor.remove can throw exception when it should
return false.
Symptoms: Calling ScheduledThreadPoolExecutor.remove with a task type
that was not produced by a ScheduledThreadPoolExecutor schedule method
should simply return false. However, it may instead throw a
ClassCastException while traversing for a non-existent task.
Solution: Add a checked cast before trying to remove.
Problem: ScheduledThreadPoolExecutor.remove can throw exception when it should
return false.
Symptoms: Calling ScheduledThreadPoolExecutor.remove with a task type
that was not produced by a ScheduledThreadPoolExecutor schedule method
should simply return false. However, it may instead throw a
ClassCastException while traversing for a non-existent task.
Solution: Add a checked cast before trying to remove.
- duplicates
-
JDK-4997779 remove method in ScheduledPoolExecutor throws exception
- Closed