Remove unnecessary type specifications

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=179585680
This commit is contained in:
mcilwain 2017-12-19 12:03:43 -08:00 committed by Ben McIlwain
parent f1ae66d148
commit ed0670b614
52 changed files with 193 additions and 221 deletions

View file

@ -78,7 +78,7 @@ public class CreateLrpTokensCommandTest extends CommandTestCase<CreateLrpTokensC
.doThrow(fakeException)
.doCallRealMethod()
.when(spyCommand)
.saveTokens(Mockito.<ImmutableSet<LrpTokenEntity>>any());
.saveTokens(Mockito.any());
runCommand("--assignee=domain.tld", "--tlds=tld");
assertLrpTokens(
createToken("LRP_abcdefghijklmnop", "domain.tld", ImmutableSet.of("tld"), null, null));

View file

@ -168,7 +168,7 @@ public class EppToolVerifier {
ArgumentCaptor<byte[]> params = ArgumentCaptor.forClass(byte[].class);
verify(connection, atLeast(0)).send(
eq("/_dr/epptool"),
eq(ImmutableMap.<String, Object>of()),
eq(ImmutableMap.of()),
eq(MediaType.FORM_DATA),
params.capture());
capturedParams = ImmutableList.copyOf(params.getAllValues());

View file

@ -52,7 +52,7 @@ public abstract class ListObjectsCommandTestCase<C extends ListObjectsCommand>
* The TLD to be used (for those subclasses that use TLDs; defaults to empty).
*/
protected List<String> getTlds() {
return ImmutableList.<String>of();
return ImmutableList.of();
}
/**
@ -101,7 +101,7 @@ public abstract class ListObjectsCommandTestCase<C extends ListObjectsCommand>
} else {
runCommand(tldsParameter);
}
verifySent(null, Optional.<Boolean>empty(), Optional.<Boolean>empty());
verifySent(null, Optional.empty(), Optional.empty());
}
@Test
@ -111,7 +111,7 @@ public abstract class ListObjectsCommandTestCase<C extends ListObjectsCommand>
} else {
runCommand("--fields=fieldName", tldsParameter);
}
verifySent("fieldName", Optional.<Boolean>empty(), Optional.<Boolean>empty());
verifySent("fieldName", Optional.empty(), Optional.empty());
}
@Test
@ -121,7 +121,7 @@ public abstract class ListObjectsCommandTestCase<C extends ListObjectsCommand>
} else {
runCommand("--fields=*", tldsParameter);
}
verifySent("*", Optional.<Boolean>empty(), Optional.<Boolean>empty());
verifySent("*", Optional.empty(), Optional.empty());
}
@Test
@ -131,7 +131,7 @@ public abstract class ListObjectsCommandTestCase<C extends ListObjectsCommand>
} else {
runCommand("--fields=fieldName", "--header=true", tldsParameter);
}
verifySent("fieldName", Optional.of(Boolean.TRUE), Optional.<Boolean>empty());
verifySent("fieldName", Optional.of(Boolean.TRUE), Optional.empty());
}
@Test
@ -141,7 +141,7 @@ public abstract class ListObjectsCommandTestCase<C extends ListObjectsCommand>
} else {
runCommand("--fields=fieldName", "--header=false", tldsParameter);
}
verifySent("fieldName", Optional.of(Boolean.FALSE), Optional.<Boolean>empty());
verifySent("fieldName", Optional.of(Boolean.FALSE), Optional.empty());
}
@Test
@ -151,7 +151,7 @@ public abstract class ListObjectsCommandTestCase<C extends ListObjectsCommand>
} else {
runCommand("--fields=fieldName", "--full_field_names", tldsParameter);
}
verifySent("fieldName", Optional.<Boolean>empty(), Optional.of(Boolean.TRUE));
verifySent("fieldName", Optional.empty(), Optional.of(Boolean.TRUE));
}
@Test

View file

@ -36,7 +36,7 @@ public class PublishDetailReportCommandTest extends CommandTestCase<PublishDetai
public void init() throws Exception {
command.setConnection(connection);
when(connection.sendJson(anyString(), anyMapOf(String.class, Object.class)))
.thenReturn(ImmutableMap.<String, Object>of("driveId", "some123id"));
.thenReturn(ImmutableMap.of("driveId", "some123id"));
}
@Test

View file

@ -41,10 +41,9 @@ public class VerifyOteCommandTest extends CommandTestCase<VerifyOteCommand> {
public void init() throws Exception {
command.setConnection(connection);
ImmutableMap<String, Object> response =
ImmutableMap.<String, Object>of(
"blobio", "Num actions: 19 - Reqs passed: 19/19 - Overall: PASS");
ImmutableMap.of("blobio", "Num actions: 19 - Reqs passed: 19/19 - Overall: PASS");
when(connection.sendJson(anyString(), anyMapOf(String.class, Object.class)))
.thenReturn(ImmutableMap.<String, Object>of("blobio", response));
.thenReturn(ImmutableMap.of("blobio", response));
}
@Test