mirror of
https://github.com/google/nomulus
synced 2026-01-09 23:47:49 +00:00
Clean up minor items found during DiRT
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=151125802
This commit is contained in:
@@ -60,7 +60,7 @@ public final class DomainNameUtils {
|
||||
public static String getTldFromDomainName(String fullyQualifiedDomainName) {
|
||||
checkArgument(
|
||||
!Strings.isNullOrEmpty(fullyQualifiedDomainName),
|
||||
"secondLevelDomainName cannot be null or empty");
|
||||
"fullyQualifiedDomainName cannot be null or empty");
|
||||
return getTldFromDomainName(InternetDomainName.from(fullyQualifiedDomainName));
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public final class DomainNameUtils {
|
||||
*/
|
||||
public static String getTldFromDomainName(InternetDomainName domainName) {
|
||||
checkArgumentNotNull(domainName);
|
||||
checkArgument(domainName.hasParent(), "secondLevelDomainName does not have a TLD");
|
||||
checkArgument(domainName.hasParent(), "domainName does not have a TLD");
|
||||
return domainName.parent().toString();
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public class DomainNameUtilsTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCanonicalizeDomainName_acePrefixUnicodeChars() {
|
||||
public void testCanonicalizeDomainName_acePrefixUnicodeChars() throws Exception {
|
||||
thrown.expect(IllegalArgumentException.class);
|
||||
canonicalizeDomainName("xn--みんな");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user