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:
mcilwain 2016-05-05 11:35:58 -07:00 committed by Justine Tunney
parent 3ec6aebe44
commit 4a9be60e0b
8 changed files with 37 additions and 26 deletions

View file

@ -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");
}