//TODO file bug upstream that queryResult may never be null
int length = queryResult == null ? 0 : queryResult.length;
for (int j = 0; j < length; j++) {
final Record record = queryResult[j];
if(record instanceof NSRecord) {
final NSRecord nsRecord = (NSRecord) record;
final Name target = nsRecord.getTarget();
result.add(new SRVRecord(name, DClass.IN, nsRecord.getTTL(), 0, 0, SimpleResolver.DEFAULT_PORT, target));
}
}
//query for primary ns in SOA record (may overwrite/be equal to one of the ns records)
query = new Lookup(zone, Type.SOA);