code: private boolean handleRedirect(
              DnsQuestion question, AddressedEnvelope<DnsResponse, InetSocketAddress> envelope,
              final DnsQueryLifecycleObserver queryLifecycleObserver, Promise<List<T>> promise) {
          final DnsResponse res = envelope.content();
  
          // Check if we have answers, if not this may be an non authority NS and so redirects must be handled.
          if (res.count(DnsSection.ANSWER) == 0) {
              AuthoritativeNameServerList serverNames = extractAuthoritativeNameServers(question.name(), res);
              if (serverNames != null) {
                  int additionalCount = res.count(DnsSection.ADDITIONAL);
  
                  AuthoritativeDnsServerCache authoritativeDnsServerCache = authoritativeDnsServerCache();
                  for (int i = 0; i < additionalCount; i++) {
                      final DnsRecord r = res.recordAt(DnsSection.ADDITIONAL, i);
  
                      if (r.type() == DnsRecordType.A && !parent.supportsARecords() ||
                          r.type() == DnsRecordType.AAAA && !parent.supportsAAAARecords()) {
                          continue;
                      }
  
                      // We may have multiple ADDITIONAL entries for the same nameserver name. For example one AAAA and
                      // one A record.
                      serverNames.handleWithAdditional(parent, r, authoritativeDnsServerCache);
                  }
  
                  // Process all unresolved nameservers as well.
                  serverNames.handleWithoutAdditionals(parent, resolveCache(), authoritativeDnsServerCache);
  
                  List<InetSocketAddress> addresses = serverNames.addressList();
  
                  // Give the user the chance to sort or filter the used servers for the query.
                  DnsServerAddressStream serverStream = parent.newRedirectDnsServerStream(
                          question.name(), addresses);
  
                  if (serverStream != null) {
                      query(serverStream, 0, question,
                            queryLifecycleObserver.queryRedirected(new DnsAddressStreamList(serverStream)),
                            true, promise, null);
                      return true;
                  }
              }
          }
          return false;
      }
docs: Handles a redirect answer if needed and returns {@code true} if a redirect query has been made.