mirror of https://github.com/apache/activemq.git
Rewriting logic in finally block of PooledTaskRunner to avoid using a return statement
This commit is contained in:
parent
d4c7cce7d7
commit
f25e7ab47f
|
@ -142,17 +142,16 @@ class PooledTaskRunner implements TaskRunner {
|
||||||
if (shutdown) {
|
if (shutdown) {
|
||||||
queued = false;
|
queued = false;
|
||||||
runable.notifyAll();
|
runable.notifyAll();
|
||||||
return;
|
} else {
|
||||||
}
|
// If we could not iterate all the items
|
||||||
|
// then we need to re-queue.
|
||||||
|
if (!done) {
|
||||||
|
queued = true;
|
||||||
|
}
|
||||||
|
|
||||||
// If we could not iterate all the items
|
if (queued) {
|
||||||
// then we need to re-queue.
|
executor.execute(runable);
|
||||||
if (!done) {
|
}
|
||||||
queued = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (queued) {
|
|
||||||
executor.execute(runable);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue