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

@ -150,7 +150,7 @@ public class GenerateZoneFilesAction implements Runnable, JsonActionRunner.JsonA
String.format(
GCS_PATH_FORMAT, bucket, String.format(FILENAME_FORMAT, tld, exportTime)))
.collect(toImmutableList());
return ImmutableMap.<String, Object>of(
return ImmutableMap.of(
"jobPath", createJobPath(jobId),
"filenames", filenames);
}

View file

@ -236,7 +236,7 @@ public abstract class ListObjectsAction<T extends ImmutableObject> implements Ru
if (isHeaderRowInUse(data)) {
// Add a row of headers (column names mapping to themselves).
Map<String, String> headerRow =
Maps.asMap(data.columnKeySet(), Functions.<String>identity());
Maps.asMap(data.columnKeySet(), Functions.identity());
lines.add(rowFormatter.apply(headerRow));
// Add a row of separator lines (column names mapping to '-' * column width).

View file

@ -58,8 +58,8 @@ public class ResaveAllHistoryEntriesAction implements Runnable {
.runMapOnly(
new ResaveAllHistoryEntriesActionMapper(),
ImmutableList.of(EppResourceInputs.createChildEntityInput(
ImmutableSet.<Class<? extends EppResource>>of(EppResource.class),
ImmutableSet.<Class<? extends HistoryEntry>>of(HistoryEntry.class))))));
ImmutableSet.of(EppResource.class),
ImmutableSet.of(HistoryEntry.class))))));
}
/** Mapper to re-save all HistoryEntry entities. */

View file

@ -49,7 +49,7 @@ public class ToolsServerModule {
@Parameter("fullFieldNames")
static Optional<Boolean> provideFullFieldNames(HttpServletRequest req) {
String s = emptyToNull(req.getParameter(ListObjectsAction.FULL_FIELD_NAMES_PARAM));
return (s == null) ? Optional.<Boolean>empty() : Optional.of(Boolean.parseBoolean(s));
return (s == null) ? Optional.empty() : Optional.of(Boolean.parseBoolean(s));
}
@Provides
@ -74,7 +74,7 @@ public class ToolsServerModule {
@Parameter("printHeaderRow")
static Optional<Boolean> providePrintHeaderRow(HttpServletRequest req) {
String s = emptyToNull(req.getParameter(ListObjectsAction.PRINT_HEADER_ROW_PARAM));
return (s == null) ? Optional.<Boolean>empty() : Optional.of(Boolean.parseBoolean(s));
return (s == null) ? Optional.empty() : Optional.of(Boolean.parseBoolean(s));
}
@Provides

View file

@ -177,7 +177,7 @@ public class VerifyOteAction implements Runnable, JsonAction {
HOST_CREATES_SUBORDINATE(1, equalTo(Type.HOST_CREATE), IS_SUBORDINATE),
HOST_DELETES(1, equalTo(Type.HOST_DELETE)),
HOST_UPDATES(1, equalTo(Type.HOST_UPDATE)),
UNCLASSIFIED_FLOWS(0, Predicates.<HistoryEntry.Type>alwaysFalse());
UNCLASSIFIED_FLOWS(0, Predicates.alwaysFalse());
/** The number of StatTypes with a non-zero requirement. */
private static final int NUM_REQUIREMENTS =
@ -205,7 +205,7 @@ public class VerifyOteAction implements Runnable, JsonAction {
this.requirement = requirement;
this.typeFilter = typeFilter;
if (eppInputFilter == null) {
this.eppInputFilter = Optional.<Predicate<EppInput>>empty();
this.eppInputFilter = Optional.empty();
} else {
this.eppInputFilter = Optional.of(eppInputFilter);
}
@ -260,7 +260,7 @@ public class VerifyOteAction implements Runnable, JsonAction {
// xmlBytes can be null on contact create and update for safe-harbor compliance.
final Optional<EppInput> eppInput =
(xmlBytes == null)
? Optional.<EppInput>empty()
? Optional.empty()
: Optional.of(unmarshal(EppInput.class, xmlBytes));
if (!statCounts.addAll(
EnumSet.allOf(StatType.class)