mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 08:57:12 +02: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:
parent
015d07a9b6
commit
c6a1c3d870
2 changed files with 3 additions and 3 deletions
|
@ -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--みんな");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue