mirror of
https://github.com/google/nomulus.git
synced 2025-08-06 01:35:17 +02:00
Remove unnecessary generic type arguments
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=175155365
This commit is contained in:
parent
8dcc2d6833
commit
2aa897e698
140 changed files with 355 additions and 465 deletions
|
@ -89,8 +89,8 @@ public class RdapActionBaseTest {
|
|||
rdapJsonFormatter.addTopLevelEntries(
|
||||
builder,
|
||||
BoilerplateType.OTHER,
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
ImmutableList.of(),
|
||||
ImmutableList.of(),
|
||||
"http://myserver.example.com/");
|
||||
return builder.build();
|
||||
}
|
||||
|
|
|
@ -159,8 +159,8 @@ public class RdapEntityActionTest {
|
|||
action.request = request;
|
||||
action.fullServletPath = "https://example.com/rdap";
|
||||
action.response = response;
|
||||
action.registrarParam = Optional.<String>empty();
|
||||
action.includeDeletedParam = Optional.<Boolean>empty();
|
||||
action.registrarParam = Optional.empty();
|
||||
action.includeDeletedParam = Optional.empty();
|
||||
action.rdapJsonFormatter = RdapTestHelper.getTestRdapJsonFormatter();
|
||||
action.rdapWhoisServer = null;
|
||||
action.sessionUtils = sessionUtils;
|
||||
|
|
|
@ -472,7 +472,7 @@ public class RdapJsonFormatterTest {
|
|||
rdapJsonFormatter.makeRdapJsonForContact(
|
||||
contactResourceTech,
|
||||
false,
|
||||
Optional.<DesignatedContact.Type>empty(),
|
||||
Optional.empty(),
|
||||
LINK_BASE,
|
||||
WHOIS_SERVER,
|
||||
clock.nowUtc(),
|
||||
|
@ -487,7 +487,7 @@ public class RdapJsonFormatterTest {
|
|||
rdapJsonFormatter.makeRdapJsonForContact(
|
||||
contactResourceNotLinked,
|
||||
false,
|
||||
Optional.<DesignatedContact.Type>empty(),
|
||||
Optional.empty(),
|
||||
LINK_BASE,
|
||||
WHOIS_SERVER,
|
||||
clock.nowUtc(),
|
||||
|
@ -626,8 +626,8 @@ public class RdapJsonFormatterTest {
|
|||
rdapJsonFormatter.addTopLevelEntries(
|
||||
builder,
|
||||
RdapJsonFormatter.BoilerplateType.OTHER,
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
ImmutableList.of(),
|
||||
ImmutableList.of(),
|
||||
LINK_BASE);
|
||||
assertThat(builder.build()).isEqualTo(loadJson("rdapjson_toplevel.json"));
|
||||
}
|
||||
|
@ -640,7 +640,7 @@ public class RdapJsonFormatterTest {
|
|||
builder,
|
||||
RdapJsonFormatter.BoilerplateType.OTHER,
|
||||
ImmutableList.of(rdapJsonFormatter.getJsonHelpNotice("/tos", LINK_BASE)),
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
ImmutableList.of(),
|
||||
LINK_BASE);
|
||||
assertThat(builder.build()).isEqualTo(loadJson("rdapjson_toplevel.json"));
|
||||
}
|
||||
|
@ -652,8 +652,8 @@ public class RdapJsonFormatterTest {
|
|||
rdapJsonFormatter.addTopLevelEntries(
|
||||
builder,
|
||||
RdapJsonFormatter.BoilerplateType.DOMAIN,
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
ImmutableList.of(),
|
||||
ImmutableList.of(),
|
||||
LINK_BASE);
|
||||
assertThat(builder.build()).isEqualTo(loadJson("rdapjson_toplevel_domain.json"));
|
||||
}
|
||||
|
@ -666,7 +666,7 @@ public class RdapJsonFormatterTest {
|
|||
builder,
|
||||
RdapJsonFormatter.BoilerplateType.DOMAIN,
|
||||
ImmutableList.of(rdapJsonFormatter.getJsonHelpNotice("/tos", LINK_BASE)),
|
||||
ImmutableList.<ImmutableMap<String, Object>>of(),
|
||||
ImmutableList.of(),
|
||||
LINK_BASE);
|
||||
assertThat(builder.build()).isEqualTo(loadJson("rdapjson_toplevel_domain.json"));
|
||||
}
|
||||
|
|
|
@ -124,7 +124,7 @@ public class RdapNameserverActionTest {
|
|||
}
|
||||
|
||||
private Object generateActualJson(String name) {
|
||||
return generateActualJson(name, Optional.<String>empty(), Optional.<Boolean>empty());
|
||||
return generateActualJson(name, Optional.empty(), Optional.empty());
|
||||
}
|
||||
|
||||
private Object generateActualJson(
|
||||
|
@ -315,7 +315,7 @@ public class RdapNameserverActionTest {
|
|||
public void testNameserver_found_sameRegistrarRequested() throws Exception {
|
||||
assertThat(
|
||||
generateActualJson(
|
||||
"ns1.cat.lol", Optional.of("TheRegistrar"), Optional.<Boolean>empty()))
|
||||
"ns1.cat.lol", Optional.of("TheRegistrar"), Optional.empty()))
|
||||
.isEqualTo(
|
||||
generateExpectedJsonWithTopLevelEntries(
|
||||
"ns1.cat.lol",
|
||||
|
@ -342,14 +342,14 @@ public class RdapNameserverActionTest {
|
|||
|
||||
@Test
|
||||
public void testDeletedNameserver_notFound_includeDeletedSetFalse() throws Exception {
|
||||
generateActualJson("nsdeleted.cat.lol", Optional.<String>empty(), Optional.of(false));
|
||||
generateActualJson("nsdeleted.cat.lol", Optional.empty(), Optional.of(false));
|
||||
assertThat(response.getStatus()).isEqualTo(404);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDeletedNameserver_notFound_notLoggedIn() throws Exception {
|
||||
when(sessionUtils.checkRegistrarConsoleLogin(request, userAuthInfo)).thenReturn(false);
|
||||
generateActualJson("nsdeleted.cat.lol", Optional.<String>empty(), Optional.of(true));
|
||||
generateActualJson("nsdeleted.cat.lol", Optional.empty(), Optional.of(true));
|
||||
assertThat(response.getStatus()).isEqualTo(404);
|
||||
}
|
||||
|
||||
|
@ -357,7 +357,7 @@ public class RdapNameserverActionTest {
|
|||
public void testDeletedNameserver_notFound_loggedInAsDifferentRegistrar() throws Exception {
|
||||
when(sessionUtils.checkRegistrarConsoleLogin(request, userAuthInfo)).thenReturn(true);
|
||||
when(sessionUtils.getRegistrarClientId(request)).thenReturn("otherregistrar");
|
||||
generateActualJson("nsdeleted.cat.lol", Optional.<String>empty(), Optional.of(true));
|
||||
generateActualJson("nsdeleted.cat.lol", Optional.empty(), Optional.of(true));
|
||||
assertThat(response.getStatus()).isEqualTo(404);
|
||||
}
|
||||
|
||||
|
@ -366,7 +366,7 @@ public class RdapNameserverActionTest {
|
|||
when(sessionUtils.checkRegistrarConsoleLogin(request, userAuthInfo)).thenReturn(true);
|
||||
when(sessionUtils.getRegistrarClientId(request)).thenReturn("TheRegistrar");
|
||||
assertThat(
|
||||
generateActualJson("nsdeleted.cat.lol", Optional.<String>empty(), Optional.of(true)))
|
||||
generateActualJson("nsdeleted.cat.lol", Optional.empty(), Optional.of(true)))
|
||||
.isEqualTo(
|
||||
generateExpectedJsonWithTopLevelEntries(
|
||||
"nsdeleted.cat.lol",
|
||||
|
@ -385,7 +385,7 @@ public class RdapNameserverActionTest {
|
|||
when(sessionUtils.getRegistrarClientId(request)).thenReturn("irrelevant");
|
||||
newRdapNameserverAction(
|
||||
"nsdeleted.cat.lol",
|
||||
Optional.<String>empty(),
|
||||
Optional.empty(),
|
||||
Optional.of(true),
|
||||
AuthResult.create(AuthLevel.USER, adminUserAuthInfo))
|
||||
.run();
|
||||
|
|
|
@ -56,7 +56,7 @@ public class RdapTestHelper {
|
|||
switch (contactNoticeType) {
|
||||
case DOMAIN:
|
||||
noticesBuilder.add(
|
||||
ImmutableMap.<String, Object>of(
|
||||
ImmutableMap.of(
|
||||
"title", "Contacts Hidden",
|
||||
"description",
|
||||
ImmutableList.of("Domain contacts are visible only to the owning registrar."),
|
||||
|
@ -64,7 +64,7 @@ public class RdapTestHelper {
|
|||
break;
|
||||
case CONTACT:
|
||||
noticesBuilder.add(
|
||||
ImmutableMap.<String, Object>of(
|
||||
ImmutableMap.of(
|
||||
"title", "Contact Personal Data Hidden",
|
||||
"description",
|
||||
ImmutableList.of(
|
||||
|
@ -75,7 +75,7 @@ public class RdapTestHelper {
|
|||
break;
|
||||
}
|
||||
noticesBuilder.add(
|
||||
ImmutableMap.<String, Object>of(
|
||||
ImmutableMap.of(
|
||||
"title", "RDAP Terms of Service",
|
||||
"description",
|
||||
ImmutableList.of(
|
||||
|
@ -119,7 +119,7 @@ public class RdapTestHelper {
|
|||
ImmutableList.Builder<ImmutableMap<String, Object>> remarksBuilder =
|
||||
getBuilderWithOthersAdded(otherRemarks);
|
||||
remarksBuilder.add(
|
||||
ImmutableMap.<String, Object>of(
|
||||
ImmutableMap.of(
|
||||
"description",
|
||||
ImmutableList.of(
|
||||
"This response conforms to the RDAP Operational Profile for gTLD Registries and"
|
||||
|
@ -139,20 +139,20 @@ public class RdapTestHelper {
|
|||
getBuilderWithOthersAdded(otherRemarks);
|
||||
if (addNoContactRemark) {
|
||||
remarksBuilder.add(
|
||||
ImmutableMap.<String, Object>of(
|
||||
ImmutableMap.of(
|
||||
"title", "Contacts Hidden",
|
||||
"description",
|
||||
ImmutableList.of("Domain contacts are visible only to the owning registrar."),
|
||||
"type", "object truncated due to unexplainable reasons"));
|
||||
}
|
||||
remarksBuilder.add(
|
||||
ImmutableMap.<String, Object>of(
|
||||
ImmutableMap.of(
|
||||
"description",
|
||||
ImmutableList.of(
|
||||
"This response conforms to the RDAP Operational Profile for gTLD Registries and"
|
||||
+ " Registrars version 1.0")));
|
||||
remarksBuilder.add(
|
||||
ImmutableMap.<String, Object>of(
|
||||
ImmutableMap.of(
|
||||
"title",
|
||||
"EPP Status Codes",
|
||||
"description",
|
||||
|
@ -167,7 +167,7 @@ public class RdapTestHelper {
|
|||
"href", "https://icann.org/epp",
|
||||
"type", "text/html"))));
|
||||
remarksBuilder.add(
|
||||
ImmutableMap.<String, Object>of(
|
||||
ImmutableMap.of(
|
||||
"description",
|
||||
ImmutableList.of(
|
||||
"URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue