git-svn-id: https://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk@552836
13f79535-47bb-0310-9956-
ffa450edef68
//only count active members in this node
int counter = 0;
Iterator it = super.entrySet().iterator();
- while (it.hasNext() ) {
+ while (it!=null && it.hasNext() ) {
Map.Entry e = (Map.Entry) it.next();
if ( e != null ) {
MapEntry entry = (MapEntry) super.get(e.getKey());
- if (entry.isPrimary() && entry.getValue() != null) counter++;
+ if (entry!=null && entry.isPrimary() && entry.getValue() != null) counter++;
}
}
return counter;