Remove unnecessary generic type arguments

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=175155365
This commit is contained in:
mcilwain 2017-11-09 07:33:40 -08:00 committed by jianglai
parent 8dcc2d6833
commit 2aa897e698
140 changed files with 355 additions and 465 deletions

View file

@ -54,9 +54,9 @@ public abstract class RdapAuthorization extends ImmutableObject {
}
public static final RdapAuthorization PUBLIC_AUTHORIZATION =
create(Role.PUBLIC, ImmutableList.<String>of());
create(Role.PUBLIC, ImmutableList.of());
public static final RdapAuthorization ADMINISTRATOR_AUTHORIZATION =
create(Role.ADMINISTRATOR, ImmutableList.<String>of());
create(Role.ADMINISTRATOR, ImmutableList.of());
}

View file

@ -156,7 +156,7 @@ public class RdapDomainSearchAction extends RdapActionBase {
builder,
BoilerplateType.DOMAIN,
results.getIncompletenessWarnings(),
ImmutableList.<ImmutableMap<String, Object>>of(),
ImmutableList.of(),
fullServletPath);
return builder.build();
}
@ -210,7 +210,7 @@ public class RdapDomainSearchAction extends RdapActionBase {
loadByForeignKey(DomainResource.class, partialStringQuery.getInitialString(), now);
ImmutableList<DomainResource> results =
((domainResource == null) || !shouldBeVisible(domainResource, now))
? ImmutableList.<DomainResource>of()
? ImmutableList.of()
: ImmutableList.of(domainResource);
return makeSearchResults(results, now);
}

View file

@ -24,7 +24,6 @@ import com.google.common.primitives.Longs;
import com.google.re2j.Pattern;
import com.googlecode.objectify.Key;
import google.registry.model.contact.ContactResource;
import google.registry.model.domain.DesignatedContact;
import google.registry.model.registrar.Registrar;
import google.registry.rdap.RdapJsonFormatter.OutputDataType;
import google.registry.rdap.RdapMetrics.EndpointType;
@ -95,7 +94,7 @@ public class RdapEntityAction extends RdapActionBase {
return rdapJsonFormatter.makeRdapJsonForContact(
contactResource,
true,
Optional.<DesignatedContact.Type>empty(),
Optional.empty(),
fullServletPath,
rdapWhoisServer,
now,

View file

@ -27,7 +27,6 @@ import com.google.common.primitives.Booleans;
import com.google.common.primitives.Longs;
import com.googlecode.objectify.cmd.Query;
import google.registry.model.contact.ContactResource;
import google.registry.model.domain.DesignatedContact;
import google.registry.model.registrar.Registrar;
import google.registry.rdap.RdapJsonFormatter.BoilerplateType;
import google.registry.rdap.RdapJsonFormatter.OutputDataType;
@ -119,7 +118,7 @@ public class RdapEntitySearchAction extends RdapActionBase {
jsonBuilder,
BoilerplateType.ENTITY,
results.getIncompletenessWarnings(),
ImmutableList.<ImmutableMap<String, Object>>of(),
ImmutableList.of(),
fullServletPath);
return jsonBuilder.build();
}
@ -219,7 +218,7 @@ public class RdapEntitySearchAction extends RdapActionBase {
return makeSearchResults(
((contactResource != null) && shouldBeVisible(contactResource, now))
? ImmutableList.of(contactResource)
: ImmutableList.<ContactResource>of(),
: ImmutableList.of(),
IncompletenessWarningType.NONE,
getMatchingRegistrars(partialStringQuery.getInitialString()),
now);
@ -230,7 +229,7 @@ public class RdapEntitySearchAction extends RdapActionBase {
} else {
ImmutableList<Registrar> registrars =
partialStringQuery.getHasWildcard()
? ImmutableList.<Registrar>of()
? ImmutableList.of()
: getMatchingRegistrars(partialStringQuery.getInitialString());
// Get the contact matches and return the results, fetching an additional contact to detect
// truncation. If we are including deleted entries, we must fetch more entries, in case some
@ -257,7 +256,7 @@ public class RdapEntitySearchAction extends RdapActionBase {
Optional<Registrar> registrar = getRegistrarByIanaIdentifier(ianaIdentifier);
return (registrar.isPresent() && shouldBeVisible(registrar.get()))
? ImmutableList.of(registrar.get())
: ImmutableList.<Registrar>of();
: ImmutableList.of();
}
/**
@ -310,7 +309,7 @@ public class RdapEntitySearchAction extends RdapActionBase {
jsonOutputList.add(rdapJsonFormatter.makeRdapJsonForContact(
contact,
false,
Optional.<DesignatedContact.Type>empty(),
Optional.empty(),
fullServletPath,
rdapWhoisServer,
now,

View file

@ -65,7 +65,7 @@ public class RdapHelpAction extends RdapActionBase {
builder,
BoilerplateType.OTHER,
ImmutableList.of(rdapJsonFormatter.getJsonHelpNotice(pathSearchString, fullServletPath)),
ImmutableList.<ImmutableMap<String, Object>>of(),
ImmutableList.of(),
fullServletPath);
return builder.build();
}

View file

@ -27,7 +27,7 @@ public class RdapIcannStandardInformation {
/** Required by ICANN RDAP Profile section 1.4.10. */
private static final ImmutableMap<String, Object> CONFORMANCE_REMARK =
ImmutableMap.<String, Object>of(
ImmutableMap.of(
"description",
ImmutableList.of(
"This response conforms to the RDAP Operational Profile for gTLD Registries and"
@ -35,7 +35,7 @@ public class RdapIcannStandardInformation {
/** Required by ICANN RDAP Profile section 1.5.18. */
private static final ImmutableMap<String, Object> DOMAIN_STATUS_CODES_REMARK =
ImmutableMap.<String, Object> of(
ImmutableMap.of(
"title",
"EPP Status Codes",
"description",
@ -51,7 +51,7 @@ public class RdapIcannStandardInformation {
/** Required by ICANN RDAP Profile section 1.5.20. */
private static final ImmutableMap<String, Object> INACCURACY_COMPLAINT_FORM_REMARK =
ImmutableMap.<String, Object> of(
ImmutableMap.of(
"description",
ImmutableList.of(
"URL of the ICANN Whois Inaccuracy Complaint Form: https://www.icann.org/wicf"),
@ -78,7 +78,7 @@ public class RdapIcannStandardInformation {
* @see <a href="http://mm.icann.org/pipermail/gtld-tech/2016-October/000822.html">Questions about the ICANN RDAP Profile</a>
*/
static final ImmutableMap<String, Object> SUMMARY_DATA_REMARK =
ImmutableMap.<String, Object> of(
ImmutableMap.of(
"title",
"Incomplete Data",
"description",
@ -93,7 +93,7 @@ public class RdapIcannStandardInformation {
* @see <a href="http://mm.icann.org/pipermail/gtld-tech/2016-October/000822.html">Questions about the ICANN RDAP Profile</a>
*/
static final ImmutableMap<String, Object> TRUNCATED_RESULT_SET_NOTICE =
ImmutableMap.<String, Object> of(
ImmutableMap.of(
"title",
"Search Policy",
"description",
@ -110,7 +110,7 @@ public class RdapIcannStandardInformation {
* there were too many nameservers in the first stage results.
*/
static final ImmutableMap<String, Object> POSSIBLY_INCOMPLETE_RESULT_SET_NOTICE =
ImmutableMap.<String, Object>of(
ImmutableMap.of(
"title",
"Search Policy",
"description",
@ -125,7 +125,7 @@ public class RdapIcannStandardInformation {
/** Included when the requester is not logged in as the owner of the domain being returned. */
static final ImmutableMap<String, Object> DOMAIN_CONTACTS_HIDDEN_DATA_REMARK =
ImmutableMap.<String, Object> of(
ImmutableMap.of(
"title",
"Contacts Hidden",
"description",
@ -135,7 +135,7 @@ public class RdapIcannStandardInformation {
/** Included when requester is not logged in as the owner of the contact being returned. */
static final ImmutableMap<String, Object> CONTACT_PERSONAL_DATA_HIDDEN_DATA_REMARK =
ImmutableMap.<String, Object> of(
ImmutableMap.of(
"title",
"Contact Personal Data Hidden",
"description",

View file

@ -482,7 +482,7 @@ public class RdapJsonFormatter {
remarks = ImmutableList.of(RdapIcannStandardInformation.SUMMARY_DATA_REMARK);
} else {
remarks = displayContacts
? ImmutableList.<ImmutableMap<String, Object>>of()
? ImmutableList.of()
: ImmutableList.of(RdapIcannStandardInformation.DOMAIN_CONTACTS_HIDDEN_DATA_REMARK);
ImmutableList<Object> events = makeEvents(domainResource, now);
if (!events.isEmpty()) {
@ -537,7 +537,7 @@ public class RdapJsonFormatter {
jsonBuilder,
BoilerplateType.DOMAIN,
remarks,
ImmutableList.<ImmutableMap<String, Object>>of(), linkBase);
ImmutableList.of(), linkBase);
} else if (!remarks.isEmpty()) {
jsonBuilder.put(REMARKS, remarks);
}
@ -633,7 +633,7 @@ public class RdapJsonFormatter {
jsonBuilder,
BoilerplateType.NAMESERVER,
remarks,
ImmutableList.<ImmutableMap<String, Object>>of(), linkBase);
ImmutableList.of(), linkBase);
} else if (!remarks.isEmpty()) {
jsonBuilder.put(REMARKS, remarks);
}
@ -735,7 +735,7 @@ public class RdapJsonFormatter {
jsonBuilder,
BoilerplateType.ENTITY,
remarksBuilder.build(),
ImmutableList.<ImmutableMap<String, Object>>of(),
ImmutableList.of(),
linkBase);
} else {
ImmutableList<ImmutableMap<String, Object>> remarks = remarksBuilder.build();
@ -841,7 +841,7 @@ public class RdapJsonFormatter {
jsonBuilder,
BoilerplateType.ENTITY,
remarks,
ImmutableList.<ImmutableMap<String, Object>>of(),
ImmutableList.of(),
linkBase);
} else if (!remarks.isEmpty()) {
jsonBuilder.put(REMARKS, remarks);
@ -1036,7 +1036,7 @@ public class RdapJsonFormatter {
jsonBuilder.add(nullToEmpty(address.getState()));
jsonBuilder.add(nullToEmpty(address.getZip()));
jsonBuilder.add(new Locale("en", address.getCountryCode()).getDisplayCountry(new Locale("en")));
return ImmutableList.<Object>of(
return ImmutableList.of(
"adr",
ImmutableMap.of(),
"text",
@ -1046,7 +1046,7 @@ public class RdapJsonFormatter {
/** Creates a vCard phone number entry. */
private static ImmutableList<Object> makePhoneEntry(
ImmutableMap<String, ImmutableList<String>> type, String phoneNumber) {
return ImmutableList.<Object>of("tel", type, "uri", phoneNumber);
return ImmutableList.of("tel", type, "uri", phoneNumber);
}
/** Creates a phone string in URI format, as per the vCard spec. */
@ -1111,7 +1111,7 @@ public class RdapJsonFormatter {
* RFC 7483: JSON Responses for the Registration Data Access Protocol (RDAP)</a>
*/
ImmutableMap<String, Object> makeError(int status, String title, String description) {
return ImmutableMap.<String, Object>of(
return ImmutableMap.of(
"rdapConformance", CONFORMANCE_LIST,
"lang", "en",
"errorCode", (long) status,

View file

@ -131,7 +131,7 @@ public class RdapNameserverSearchAction extends RdapActionBase {
jsonBuilder,
BoilerplateType.NAMESERVER,
results.getIncompletenessWarnings(),
ImmutableList.<ImmutableMap<String, Object>>of(),
ImmutableList.of(),
fullServletPath);
return jsonBuilder.build();
}

View file

@ -69,6 +69,6 @@ abstract class RdapSearchResults {
if (incompletenessWarningType() == IncompletenessWarningType.MIGHT_BE_INCOMPLETE) {
return POSSIBLY_INCOMPLETE_NOTICES;
}
return ImmutableList.<ImmutableMap<String, Object>>of();
return ImmutableList.of();
}
}