}
}
if (childCount > 0 && depth >= 0) {
if (filter != null) {
NameFilter childFilter = filter.getChildNodeFilter();
if (childFilter != null && !childFilter.containsWildcard()) {
// optimization for large child node lists:
// no need to iterate over the entire child node list if the filter
// does not include wildcards
int count = maxChildNodes == -1 ? Integer.MAX_VALUE : maxChildNodes;
for (String name : childFilter.getInclusionPatterns()) {