Hi Russ,
On 26/08/2016 5:39 AM, Russ Harmon wrote:
Hello,
I'd like to report a (minor) feature request / bug in the core libs. What's
the best way for me to do that?
Brian already gave you the general answer, but in this case one of your
colleagues at Google, Martin Buccholz, is one of the primary maintainers
of the java.util.concurrent code.
I recently ran into this stack trace
<https://gist.github.com/eatnumber1/10190a7cbe152ffe65135e1aa2678299>. It's
not very useful to me, since I can't determine from either the message or
the stack trace why the task was rejected. It would be much more helpful if
either a) the message stated the reason, or b) the stack trace pointed at a
line of code which unambiguously indicated a reason (e.x. a list of "if"
statements which throw this exception, so I can look at the condition to
see why the task was rejected)
It is documented to be thrown:
* If the task cannot be submitted for execution, either because this
* executor has been shutdown or because its capacity has been reached,
* the task is handled by the current {@code RejectedExecutionHandler}.
The actual code that throws it doesn't know the exact reason. But you
seem to be running a custom RejectedExeceptionHandler so it should be
able to determine whether the executor is shutdown, or if using a
bounded queue which may have become full.
Cheers,
David
Thanks,
Russ Harmon
Google Site Reliability Engineer