SimpleResolver simpleResolver = (SimpleResolver) resolvers.remove(key); resolver.deleteResolver(simpleResolver);
org.xbill.DNS.Resolver resolv = (org.xbill.DNS.Resolver) resolvers.remove(key);  if (resolver.getResolvers().length == 1) resolver = null; else resolver.deleteResolver(resolv);
  public static void removeDnsServer(ProtocolAddress _dnsserver)  {    if (resolver == null)    {      return;    }    String key = _dnsserver.toString();    if (resolvers.containsKey(key))    {      SimpleResolver simpleResolver = (SimpleResolver) resolvers.remove(key);      resolver.deleteResolver(simpleResolver);    }  }