mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 17:07:15 +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) {
|
public static String getTldFromDomainName(String fullyQualifiedDomainName) {
|
||||||
checkArgument(
|
checkArgument(
|
||||||
!Strings.isNullOrEmpty(fullyQualifiedDomainName),
|
!Strings.isNullOrEmpty(fullyQualifiedDomainName),
|
||||||
"secondLevelDomainName cannot be null or empty");
|
"fullyQualifiedDomainName cannot be null or empty");
|
||||||
return getTldFromDomainName(InternetDomainName.from(fullyQualifiedDomainName));
|
return getTldFromDomainName(InternetDomainName.from(fullyQualifiedDomainName));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@ public final class DomainNameUtils {
|
||||||
*/
|
*/
|
||||||
public static String getTldFromDomainName(InternetDomainName domainName) {
|
public static String getTldFromDomainName(InternetDomainName domainName) {
|
||||||
checkArgumentNotNull(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();
|
return domainName.parent().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,7 @@ public class DomainNameUtilsTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testCanonicalizeDomainName_acePrefixUnicodeChars() {
|
public void testCanonicalizeDomainName_acePrefixUnicodeChars() throws Exception {
|
||||||
thrown.expect(IllegalArgumentException.class);
|
thrown.expect(IllegalArgumentException.class);
|
||||||
canonicalizeDomainName("xn--みんな");
|
canonicalizeDomainName("xn--みんな");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue