mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 08:57:12 +02:00
Rename DomainNameUtils method to getTldFromSld
This is broken out from [] ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=121599268
This commit is contained in:
parent
3ec6aebe44
commit
4a9be60e0b
8 changed files with 37 additions and 26 deletions
|
@ -20,7 +20,7 @@ import static com.google.common.net.HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN;
|
|||
import static google.registry.model.eppcommon.ProtocolDefinition.ServiceExtension.FEE_0_6;
|
||||
import static google.registry.ui.server.SoyTemplateUtils.createTofuSupplier;
|
||||
import static google.registry.util.DomainNameUtils.canonicalizeDomainName;
|
||||
import static google.registry.util.DomainNameUtils.getTldFromDomainName;
|
||||
import static google.registry.util.DomainNameUtils.getTldFromSld;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
import static org.json.simple.JSONValue.toJSONString;
|
||||
|
||||
|
@ -89,7 +89,7 @@ public class CheckApiServlet extends HttpServlet {
|
|||
try {
|
||||
domainString = canonicalizeDomainName(nullToEmpty(domainString));
|
||||
// Validate the TLD.
|
||||
getTldFromDomainName(domainString);
|
||||
getTldFromSld(domainString);
|
||||
} catch (IllegalStateException | IllegalArgumentException e) {
|
||||
return fail("Must supply a valid second level domain name");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue