mirror of
https://github.com/google/nomulus.git
synced 2025-07-20 09:46:03 +02:00
Remove TLD parameters from WHOIS command factory methods
The small efficiency increase in not having to look up the TLDs again did not justify making the externally extensible API more complicated. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=145465971
This commit is contained in:
parent
6c11ac5392
commit
579e4cb74e
5 changed files with 13 additions and 49 deletions
|
@ -179,14 +179,14 @@ class WhoisReader {
|
|||
return new RegistrarLookupCommand(arg1);
|
||||
}
|
||||
|
||||
// If the target is exactly one level above the TLD, then this is an second level domain
|
||||
// If the target is exactly one level above the TLD, then this is a second level domain
|
||||
// (SLD) and we should do a domain lookup on it.
|
||||
if (targetName.parent().equals(tld.get())) {
|
||||
return commandFactory.domainLookup(targetName, tld.get());
|
||||
return commandFactory.domainLookup(targetName);
|
||||
}
|
||||
|
||||
// The target is more than one level above the TLD, so we'll assume it's a nameserver.
|
||||
return commandFactory.nameserverLookupByHost(targetName, tld.get());
|
||||
return commandFactory.nameserverLookupByHost(targetName);
|
||||
} catch (IllegalArgumentException e) {
|
||||
// Silently ignore this exception.
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue