Fixes #3628 - NPE in QueuedThreadPool.getReservedThreads().
Added guard to avoid NPE. Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
This commit is contained in:
parent
6c6646286d
commit
e45c176649
|
@ -394,7 +394,11 @@ public class QueuedThreadPool extends ContainerLifeCycle implements SizedThreadP
|
|||
public int getReservedThreads()
|
||||
{
|
||||
if (isStarted())
|
||||
return getBean(ReservedThreadExecutor.class).getCapacity();
|
||||
{
|
||||
ReservedThreadExecutor reservedThreadExecutor = getBean(ReservedThreadExecutor.class);
|
||||
if (reservedThreadExecutor != null)
|
||||
return reservedThreadExecutor.getCapacity();
|
||||
}
|
||||
return _reservedThreads;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue