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:
Almas Abdrazak 2023-06-25 01:37:34 -07:00 committed by GitHub
parent 4e19fac07a
commit 283b74a599
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -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
*/