mirror of
https://github.com/google/nomulus.git
synced 2025-05-20 03:09:33 +02:00
Remove unnecessary type specifications
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=179585680
This commit is contained in:
parent
f1ae66d148
commit
ed0670b614
52 changed files with 193 additions and 221 deletions
|
@ -95,7 +95,6 @@ import google.registry.model.reporting.HistoryEntry;
|
|||
import google.registry.model.smd.EncodedSignedMark;
|
||||
import google.registry.model.transfer.TransferData;
|
||||
import google.registry.model.transfer.TransferData.Builder;
|
||||
import google.registry.model.transfer.TransferData.TransferServerApproveEntity;
|
||||
import google.registry.model.transfer.TransferStatus;
|
||||
import google.registry.tmch.LordnTask;
|
||||
import java.util.Arrays;
|
||||
|
@ -513,7 +512,7 @@ public class DatastoreHelper {
|
|||
.setTransferData(createTransferDataBuilder(requestTime, expirationTime)
|
||||
.setPendingTransferExpirationTime(now.plus(getContactAutomaticTransferLength()))
|
||||
.setServerApproveEntities(
|
||||
ImmutableSet.<Key<? extends TransferServerApproveEntity>>of(
|
||||
ImmutableSet.of(
|
||||
// Pretend it's 3 days since the request
|
||||
Key.create(persistResource(
|
||||
createPollMessageForImplicitTransfer(
|
||||
|
@ -600,7 +599,7 @@ public class DatastoreHelper {
|
|||
.setServerApproveBillingEvent(Key.create(transferBillingEvent))
|
||||
.setServerApproveAutorenewEvent(Key.create(gainingClientAutorenewEvent))
|
||||
.setServerApproveAutorenewPollMessage(Key.create(gainingClientAutorenewPollMessage))
|
||||
.setServerApproveEntities(ImmutableSet.<Key<? extends TransferServerApproveEntity>>of(
|
||||
.setServerApproveEntities(ImmutableSet.of(
|
||||
Key.create(transferBillingEvent),
|
||||
Key.create(gainingClientAutorenewEvent),
|
||||
Key.create(gainingClientAutorenewPollMessage),
|
||||
|
@ -646,14 +645,14 @@ public class DatastoreHelper {
|
|||
}
|
||||
|
||||
private static Iterable<BillingEvent> getBillingEvents() {
|
||||
return Iterables.<BillingEvent>concat(
|
||||
return Iterables.concat(
|
||||
ofy().load().type(BillingEvent.OneTime.class),
|
||||
ofy().load().type(BillingEvent.Recurring.class),
|
||||
ofy().load().type(BillingEvent.Cancellation.class));
|
||||
}
|
||||
|
||||
private static Iterable<BillingEvent> getBillingEvents(EppResource resource) {
|
||||
return Iterables.<BillingEvent>concat(
|
||||
return Iterables.concat(
|
||||
ofy().load().type(BillingEvent.OneTime.class).ancestor(resource),
|
||||
ofy().load().type(BillingEvent.Recurring.class).ancestor(resource),
|
||||
ofy().load().type(BillingEvent.Cancellation.class).ancestor(resource));
|
||||
|
|
|
@ -29,7 +29,7 @@ public class EppLoader {
|
|||
private String eppXml;
|
||||
|
||||
public EppLoader(Object context, String eppXmlFilename) {
|
||||
this(context, eppXmlFilename, ImmutableMap.<String, String>of());
|
||||
this(context, eppXmlFilename, ImmutableMap.of());
|
||||
}
|
||||
|
||||
public EppLoader(Object context, String eppXmlFilename, Map<String, String> substitutions) {
|
||||
|
|
|
@ -59,7 +59,7 @@ public class FakeOAuthService implements OAuthService {
|
|||
}
|
||||
|
||||
public void setAuthorizedScopes(String... scopes) {
|
||||
this.authorizedScopes = ImmutableList.<String>copyOf(scopes);
|
||||
this.authorizedScopes = ImmutableList.copyOf(scopes);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
|
||||
package google.registry.testing;
|
||||
|
||||
import com.google.appengine.api.urlfetch.HTTPHeader;
|
||||
import com.google.appengine.api.urlfetch.HTTPRequest;
|
||||
import com.google.appengine.api.urlfetch.HTTPResponse;
|
||||
import com.google.appengine.api.urlfetch.URLFetchService;
|
||||
|
@ -42,8 +41,7 @@ public class FakeURLFetchService extends ForwardingURLFetchService {
|
|||
if (backingMap.containsKey(requestURL)) {
|
||||
return backingMap.get(requestURL);
|
||||
} else {
|
||||
return new HTTPResponse(
|
||||
HttpURLConnection.HTTP_NOT_FOUND, null, null, ImmutableList.<HTTPHeader>of());
|
||||
return new HTTPResponse(HttpURLConnection.HTTP_NOT_FOUND, null, null, ImmutableList.of());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ public class LogsSubject extends Subject<LogsSubject, TestLogHandler> {
|
|||
};
|
||||
|
||||
private List<String> getMessagesAtLevel(Level level) {
|
||||
ImmutableList.Builder<String> builder = ImmutableList.<String>builder();
|
||||
ImmutableList.Builder<String> builder = new ImmutableList.Builder<>();
|
||||
for (LogRecord log : actual().getStoredLogRecords()) {
|
||||
if (log.getLevel().equals(level)) {
|
||||
builder.add(log.getMessage());
|
||||
|
|
|
@ -213,7 +213,7 @@ public class TaskQueueHelper {
|
|||
|
||||
public static void assertTasksEnqueued(String queueName, Iterable<TaskStateInfo> taskStateInfos)
|
||||
throws Exception {
|
||||
ImmutableList.Builder<TaskMatcher> taskMatchers = ImmutableList.builder();
|
||||
ImmutableList.Builder<TaskMatcher> taskMatchers = new ImmutableList.Builder<>();
|
||||
for (TaskStateInfo taskStateInfo : taskStateInfos) {
|
||||
taskMatchers.add(new TaskMatcher(taskStateInfo));
|
||||
}
|
||||
|
|
|
@ -88,8 +88,7 @@ public abstract class MapreduceTestCase<T> extends ShardableTestCase {
|
|||
}
|
||||
|
||||
protected MapreduceRunner makeDefaultRunner() {
|
||||
return new MapreduceRunner(
|
||||
Optional.<Integer>of(getEppResourceIndexBucketCount()), Optional.<Integer>of(1));
|
||||
return new MapreduceRunner(Optional.of(getEppResourceIndexBucketCount()), Optional.of(1));
|
||||
}
|
||||
|
||||
protected List<QueueStateInfo.TaskStateInfo> getTasks(String queueName) {
|
||||
|
@ -178,7 +177,7 @@ public abstract class MapreduceTestCase<T> extends ShardableTestCase {
|
|||
*/
|
||||
protected void executeTasksUntilEmpty(String queueName, @Nullable FakeClock clock)
|
||||
throws Exception {
|
||||
executeTasks(queueName, clock, Optional.<Integer>empty());
|
||||
executeTasks(queueName, clock, Optional.empty());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue