Fixes #9947 - check that each selector inside of _selectors isn't null before calculating #totalKeys (#9962)
Check that selector isn't null before calculating totalKeys.
This commit is contained in:
parent
4e19fac07a
commit
283b74a599
|
@ -148,14 +148,14 @@ public abstract class SelectorManager extends ContainerLifeCycle implements Dump
|
|||
public int getTotalKeys()
|
||||
{
|
||||
int keys = 0;
|
||||
for (final ManagedSelector selector : _selectors)
|
||||
for (ManagedSelector selector : _selectors)
|
||||
{
|
||||
keys += selector.getTotalKeys();
|
||||
if (selector != null)
|
||||
keys += selector.getTotalKeys();
|
||||
}
|
||||
return keys;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return the number of selectors in use
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue