mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 00:47:11 +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
|
@ -62,7 +62,7 @@ public class BackupUtils {
|
|||
protected ImmutableObject computeNext() {
|
||||
EntityProto proto = new EntityProto();
|
||||
if (proto.parseDelimitedFrom(input)) { // False means end of stream; other errors throw.
|
||||
return ofy().load().<ImmutableObject>fromEntity(EntityTranslator.createFromPb(proto));
|
||||
return ofy().load().fromEntity(EntityTranslator.createFromPb(proto));
|
||||
}
|
||||
return endOfData();
|
||||
}};
|
||||
|
|
|
@ -115,8 +115,7 @@ public class ExpandRecurringBillingEventsAction implements Runnable {
|
|||
ImmutableList.of(
|
||||
new NullInput<>(),
|
||||
createChildEntityInput(
|
||||
ImmutableSet.<Class<? extends DomainResource>>of(DomainResource.class),
|
||||
ImmutableSet.<Class<? extends Recurring>>of(Recurring.class))))));
|
||||
ImmutableSet.of(DomainResource.class), ImmutableSet.of(Recurring.class))))));
|
||||
}
|
||||
|
||||
/** Mapper to expand {@link Recurring} billing events into synthetic {@link OneTime} events. */
|
||||
|
|
|
@ -211,7 +211,7 @@ public class MapreduceEntityCleanupAction implements Runnable {
|
|||
|
||||
private String requestDeletion(Set<String> actualJobIds, boolean verbose) {
|
||||
Optional<StringBuilder> payloadChunkBuilder =
|
||||
verbose ? Optional.of(new StringBuilder()) : Optional.<StringBuilder>empty();
|
||||
verbose ? Optional.of(new StringBuilder()) : Optional.empty();
|
||||
int errorCount = 0;
|
||||
for (String actualJobId : actualJobIds) {
|
||||
Optional<String> error =
|
||||
|
|
|
@ -92,7 +92,7 @@ class MapreduceEntityCleanupUtil {
|
|||
boolean ignoreState,
|
||||
Optional<String> cursor) {
|
||||
if (maxJobs.isPresent() && (maxJobs.get() <= 0)) {
|
||||
return EligibleJobResults.create(ImmutableSet.<String>of(), Optional.empty());
|
||||
return EligibleJobResults.create(ImmutableSet.of(), Optional.empty());
|
||||
}
|
||||
Set<String> eligibleJobs = new HashSet<>();
|
||||
Pair<? extends Iterable<JobRecord>, String> pair =
|
||||
|
@ -185,7 +185,7 @@ class MapreduceEntityCleanupUtil {
|
|||
private ImmutableSet<String> getPossibleIdsForPipelineJobRecur(
|
||||
BaseDatastoreService datastore, String jobId, Set<String> handledJobIds) {
|
||||
if (handledJobIds.contains(jobId)) {
|
||||
return ImmutableSet.<String>of();
|
||||
return ImmutableSet.of();
|
||||
}
|
||||
handledJobIds.add(jobId);
|
||||
|
||||
|
@ -193,7 +193,7 @@ class MapreduceEntityCleanupUtil {
|
|||
try {
|
||||
jobRecord = PipelineManager.getJob(jobId);
|
||||
} catch (NoSuchObjectException e) {
|
||||
return ImmutableSet.<String>of();
|
||||
return ImmutableSet.of();
|
||||
}
|
||||
|
||||
ImmutableSet.Builder<String> idSetBuilder = new ImmutableSet.Builder<>();
|
||||
|
|
|
@ -102,7 +102,7 @@ public class VerifyEntityIntegrityAction implements Runnable {
|
|||
@VisibleForTesting
|
||||
static BatchComponent component = DaggerBatchComponent.create();
|
||||
private static final ImmutableSet<Class<?>> RESOURCE_CLASSES =
|
||||
ImmutableSet.<Class<?>>of(
|
||||
ImmutableSet.of(
|
||||
ForeignKeyDomainIndex.class,
|
||||
DomainApplicationIndex.class,
|
||||
ForeignKeyHostIndex.class,
|
||||
|
@ -307,7 +307,7 @@ public class VerifyEntityIntegrityAction implements Runnable {
|
|||
}
|
||||
|
||||
private void mapForeignKeyIndex(ForeignKeyIndex<?> fki) {
|
||||
Key<ForeignKeyIndex<?>> fkiKey = Key.<ForeignKeyIndex<?>>create(fki);
|
||||
Key<ForeignKeyIndex<?>> fkiKey = Key.create(fki);
|
||||
@SuppressWarnings("cast")
|
||||
EppResource resource = verifyExistence(fkiKey, fki.getResourceKey());
|
||||
if (resource != null) {
|
||||
|
@ -368,7 +368,7 @@ public class VerifyEntityIntegrityAction implements Runnable {
|
|||
|
||||
private <E> void verifyExistence(Key<?> source, Set<Key<E>> targets) {
|
||||
Set<Key<E>> missingEntityKeys =
|
||||
Sets.difference(targets, ofy().load().<E>keys(targets).keySet());
|
||||
Sets.difference(targets, ofy().load().keys(targets).keySet());
|
||||
integrity().checkOneToMany(
|
||||
missingEntityKeys.isEmpty(),
|
||||
source,
|
||||
|
|
|
@ -118,11 +118,11 @@ public final class TldFanoutAction implements Runnable {
|
|||
Set<String> tlds =
|
||||
difference(
|
||||
Streams.concat(
|
||||
Streams.stream(runInEmpty ? ImmutableSet.of("") : ImmutableSet.<String>of()),
|
||||
Streams.stream(runInEmpty ? ImmutableSet.of("") : ImmutableSet.of()),
|
||||
Streams.stream(
|
||||
forEachRealTld ? getTldsOfType(REAL) : ImmutableSet.<String>of()),
|
||||
forEachRealTld ? getTldsOfType(REAL) : ImmutableSet.of()),
|
||||
Streams.stream(
|
||||
forEachTestTld ? getTldsOfType(TEST) : ImmutableSet.<String>of()))
|
||||
forEachTestTld ? getTldsOfType(TEST) : ImmutableSet.of()))
|
||||
.collect(toImmutableSet()),
|
||||
excludes);
|
||||
Multimap<String, String> flowThruParams = filterKeys(params, not(in(CONTROL_PARAMS)));
|
||||
|
|
|
@ -121,7 +121,7 @@ public class CloudDnsWriter extends BaseDnsWriter {
|
|||
// desiredRecordsBuilder is populated with an empty set to indicate that all existing records
|
||||
// should be deleted.
|
||||
if (!domainResource.isPresent() || !domainResource.get().shouldPublishToDns()) {
|
||||
desiredRecords.put(absoluteDomainName, ImmutableSet.<ResourceRecordSet>of());
|
||||
desiredRecords.put(absoluteDomainName, ImmutableSet.of());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -189,7 +189,7 @@ public class CloudDnsWriter extends BaseDnsWriter {
|
|||
|
||||
// Return early if the host is deleted.
|
||||
if (!host.isPresent()) {
|
||||
desiredRecords.put(absoluteHostName, ImmutableSet.<ResourceRecordSet>of());
|
||||
desiredRecords.put(absoluteHostName, ImmutableSet.of());
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -203,7 +203,7 @@ public class DnsUpdateWriter extends BaseDnsWriter {
|
|||
union(
|
||||
domain.getSubordinateHosts(),
|
||||
(additionalHost == null
|
||||
? ImmutableSet.<String>of()
|
||||
? ImmutableSet.of()
|
||||
: ImmutableSet.of(additionalHost)))) {
|
||||
update.delete(toAbsoluteName(hostName), Type.ANY);
|
||||
}
|
||||
|
|
|
@ -109,7 +109,7 @@ public final class PublishDetailReportAction implements Runnable, JsonAction {
|
|||
driveFolderId,
|
||||
gcsBucketName,
|
||||
gcsObjectName);
|
||||
return ImmutableMap.<String, Object>of("driveId", driveId);
|
||||
return ImmutableMap.of("driveId", driveId);
|
||||
} catch (FileNotFoundException e) {
|
||||
throw new IllegalArgumentException(e.getMessage(), e);
|
||||
}
|
||||
|
|
|
@ -134,7 +134,7 @@ public final class SyncGroupMembersAction implements Runnable {
|
|||
for (final Registrar registrar : dirtyRegistrars) {
|
||||
try {
|
||||
retrier.callWithRetry(() -> syncRegistrarContacts(registrar), RuntimeException.class);
|
||||
resultsBuilder.put(registrar, Optional.<Throwable>empty());
|
||||
resultsBuilder.put(registrar, Optional.empty());
|
||||
} catch (Throwable e) {
|
||||
logger.severe(e, e.getMessage());
|
||||
resultsBuilder.put(registrar, Optional.of(e));
|
||||
|
|
|
@ -144,9 +144,7 @@ public class CheckApiAction implements Runnable {
|
|||
}
|
||||
|
||||
private Map<String, Object> fail(String reason) {
|
||||
return ImmutableMap.<String, Object>of(
|
||||
"status", "error",
|
||||
"reason", reason);
|
||||
return ImmutableMap.of("status", "error", "reason", reason);
|
||||
}
|
||||
|
||||
/** Dagger module for the check api endpoint. */
|
||||
|
|
|
@ -108,7 +108,7 @@ public class FlowReporter {
|
|||
private static final Optional<String> extractTld(String domainName) {
|
||||
int index = domainName.indexOf('.');
|
||||
return index == -1
|
||||
? Optional.<String>empty()
|
||||
? Optional.empty()
|
||||
: Optional.of(Ascii.toLowerCase(domainName.substring(index + 1)));
|
||||
}
|
||||
|
||||
|
|
|
@ -251,7 +251,7 @@ public final class ResourceFlowUtils {
|
|||
B extends Builder<R, B> & BuilderWithTransferData<B>>
|
||||
R approvePendingTransfer(R resource, TransferStatus transferStatus, DateTime now) {
|
||||
checkArgument(transferStatus.isApproved(), "Not an approval transfer status");
|
||||
B builder = ResourceFlowUtils.<R, B>resolvePendingTransfer(resource, transferStatus, now);
|
||||
B builder = ResourceFlowUtils.resolvePendingTransfer(resource, transferStatus, now);
|
||||
return builder
|
||||
.setLastTransferTime(now)
|
||||
.setPersistedCurrentSponsorClientId(resource.getTransferData().getGainingClientId())
|
||||
|
|
|
@ -128,7 +128,7 @@ public final class ContactTransferRequestFlow implements TransactionalFlow {
|
|||
TransferData pendingTransferData = serverApproveTransferData.asBuilder()
|
||||
.setTransferStatus(TransferStatus.PENDING)
|
||||
.setServerApproveEntities(
|
||||
ImmutableSet.<Key<? extends TransferData.TransferServerApproveEntity>>of(
|
||||
ImmutableSet.of(
|
||||
Key.create(serverApproveGainingPollMessage),
|
||||
Key.create(serverApproveLosingPollMessage)))
|
||||
.build();
|
||||
|
|
|
@ -31,8 +31,8 @@ public abstract class EntityChanges {
|
|||
// Default both entities to save and entities to delete to empty sets, so that the build()
|
||||
// method won't subsequently throw an exception if one doesn't end up being applicable.
|
||||
return new AutoValue_EntityChanges.Builder()
|
||||
.setSaves(ImmutableSet.<ImmutableObject>of())
|
||||
.setDeletes(ImmutableSet.<Key<ImmutableObject>>of());
|
||||
.setSaves(ImmutableSet.of())
|
||||
.setDeletes(ImmutableSet.of());
|
||||
}
|
||||
|
||||
/** Builder for {@link EntityChanges}. */
|
||||
|
|
|
@ -184,7 +184,7 @@ public class DomainAllocateFlow implements TransactionalFlow {
|
|||
// Names on the collision list will not be delegated. Set server hold.
|
||||
.setStatusValues(getReservationTypes(domainName).contains(ReservationType.NAME_COLLISION)
|
||||
? ImmutableSet.of(StatusValue.SERVER_HOLD)
|
||||
: ImmutableSet.<StatusValue>of())
|
||||
: ImmutableSet.of())
|
||||
.setRegistrant(command.getRegistrant())
|
||||
.setAuthInfo(command.getAuthInfo())
|
||||
.setFullyQualifiedDomainName(targetId)
|
||||
|
@ -405,7 +405,7 @@ public class DomainAllocateFlow implements TransactionalFlow {
|
|||
FeeCreateCommandExtension feeCreate =
|
||||
eppInput.getSingleExtension(FeeCreateCommandExtension.class);
|
||||
return (feeCreate == null)
|
||||
? ImmutableList.<FeeTransformResponseExtension>of()
|
||||
? ImmutableList.of()
|
||||
: ImmutableList.of(createFeeCreateResponse(feeCreate, feesAndCredits));
|
||||
}
|
||||
|
||||
|
|
|
@ -187,7 +187,7 @@ public final class DomainCheckFlow implements Flow {
|
|||
}
|
||||
|
||||
return reservationTypes.isEmpty()
|
||||
? Optional.<String>empty()
|
||||
? Optional.empty()
|
||||
: Optional.of(getTypeOfHighestSeverity(reservationTypes).getMessageForCheck());
|
||||
}
|
||||
|
||||
|
|
|
@ -86,7 +86,6 @@ import google.registry.model.domain.metadata.MetadataExtension;
|
|||
import google.registry.model.domain.rgp.GracePeriodStatus;
|
||||
import google.registry.model.domain.secdns.SecDnsCreateExtension;
|
||||
import google.registry.model.eppcommon.AuthInfo;
|
||||
import google.registry.model.eppcommon.StatusValue;
|
||||
import google.registry.model.eppinput.EppInput;
|
||||
import google.registry.model.eppinput.ResourceCommand;
|
||||
import google.registry.model.eppoutput.CreateData.DomainCreateData;
|
||||
|
@ -305,7 +304,7 @@ public class DomainCreateFlow implements TransactionalFlow {
|
|||
.setStatusValues(
|
||||
registry.getDomainCreateRestricted()
|
||||
? ImmutableSet.of(SERVER_UPDATE_PROHIBITED, SERVER_TRANSFER_PROHIBITED)
|
||||
: ImmutableSet.<StatusValue>of())
|
||||
: ImmutableSet.of())
|
||||
.setContacts(command.getContacts())
|
||||
.addGracePeriod(GracePeriod.forBillingEvent(GracePeriodStatus.ADD, createBillingEvent))
|
||||
.build();
|
||||
|
@ -411,7 +410,7 @@ public class DomainCreateFlow implements TransactionalFlow {
|
|||
.setFlags(
|
||||
isAnchorTenant
|
||||
? ImmutableSet.of(BillingEvent.Flag.ANCHOR_TENANT)
|
||||
: ImmutableSet.<BillingEvent.Flag>of())
|
||||
: ImmutableSet.of())
|
||||
.setParent(historyEntry)
|
||||
.build();
|
||||
}
|
||||
|
@ -471,7 +470,7 @@ public class DomainCreateFlow implements TransactionalFlow {
|
|||
private static ImmutableList<FeeTransformResponseExtension> createResponseExtensions(
|
||||
FeeCreateCommandExtension feeCreate, FeesAndCredits feesAndCredits) {
|
||||
return (feeCreate == null)
|
||||
? ImmutableList.<FeeTransformResponseExtension>of()
|
||||
? ImmutableList.of()
|
||||
: ImmutableList.of(createFeeCreateResponse(feeCreate, feesAndCredits));
|
||||
}
|
||||
|
||||
|
|
|
@ -503,7 +503,7 @@ public class DomainFlowUtils {
|
|||
: newAutorenewPollMessage(domain)
|
||||
.setId(existingAutorenewKey.getId())
|
||||
.setAutorenewEndTime(newEndTime)
|
||||
.setParentKey(existingAutorenewKey.<HistoryEntry>getParent())
|
||||
.setParentKey(existingAutorenewKey.getParent())
|
||||
.build();
|
||||
|
||||
// If the resultant autorenew poll message would have no poll messages to deliver, then just
|
||||
|
@ -734,10 +734,10 @@ public class DomainFlowUtils {
|
|||
throw new SecDnsAllUsageException(); // Explicit all=false is meaningless.
|
||||
}
|
||||
Set<DelegationSignerData> toAdd = (add == null)
|
||||
? ImmutableSet.<DelegationSignerData>of()
|
||||
? ImmutableSet.of()
|
||||
: add.getDsData();
|
||||
Set<DelegationSignerData> toRemove = (remove == null)
|
||||
? ImmutableSet.<DelegationSignerData>of()
|
||||
? ImmutableSet.of()
|
||||
: (remove.getAll() == null) ? remove.getDsData() : oldDsData;
|
||||
// RFC 5910 specifies that removes are processed before adds.
|
||||
return ImmutableSet.copyOf(union(difference(oldDsData, toRemove), toAdd));
|
||||
|
|
|
@ -210,6 +210,6 @@ public final class DomainPricingLogic {
|
|||
return Optional.of(token);
|
||||
}
|
||||
}
|
||||
return Optional.<LrpTokenEntity>empty();
|
||||
return Optional.empty();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -47,7 +47,6 @@ import google.registry.flows.custom.DomainRenewFlowCustomLogic.BeforeResponsePar
|
|||
import google.registry.flows.custom.DomainRenewFlowCustomLogic.BeforeResponseReturnData;
|
||||
import google.registry.flows.custom.DomainRenewFlowCustomLogic.BeforeSaveParameters;
|
||||
import google.registry.flows.custom.EntityChanges;
|
||||
import google.registry.model.ImmutableObject;
|
||||
import google.registry.model.billing.BillingEvent;
|
||||
import google.registry.model.billing.BillingEvent.OneTime;
|
||||
import google.registry.model.billing.BillingEvent.Reason;
|
||||
|
@ -189,7 +188,7 @@ public final class DomainRenewFlow implements TransactionalFlow {
|
|||
.setEntityChanges(
|
||||
EntityChanges.newBuilder()
|
||||
.setSaves(
|
||||
ImmutableSet.<ImmutableObject>of(
|
||||
ImmutableSet.of(
|
||||
newDomain,
|
||||
historyEntry,
|
||||
explicitRenewEvent,
|
||||
|
@ -264,7 +263,7 @@ public final class DomainRenewFlow implements TransactionalFlow {
|
|||
private ImmutableList<FeeTransformResponseExtension> createResponseExtensions(
|
||||
Money renewCost, FeeRenewCommandExtension feeRenew) {
|
||||
return (feeRenew == null)
|
||||
? ImmutableList.<FeeTransformResponseExtension>of()
|
||||
? ImmutableList.of()
|
||||
: ImmutableList.of(feeRenew.createResponseBuilder()
|
||||
.setCurrency(renewCost.getCurrencyUnit())
|
||||
.setFees(ImmutableList.of(Fee.create(renewCost.getAmount(), FeeType.RENEW)))
|
||||
|
|
|
@ -263,7 +263,7 @@ public final class DomainRestoreRequestFlow implements TransactionalFlow {
|
|||
private static ImmutableList<FeeTransformResponseExtension> createResponseExtensions(
|
||||
Money restoreCost, Money renewCost, FeeUpdateCommandExtension feeUpdate) {
|
||||
return (feeUpdate == null)
|
||||
? ImmutableList.<FeeTransformResponseExtension>of()
|
||||
? ImmutableList.of()
|
||||
: ImmutableList.of(feeUpdate.createResponseBuilder()
|
||||
.setCurrency(restoreCost.getCurrencyUnit())
|
||||
.setFees(ImmutableList.of(
|
||||
|
|
|
@ -119,7 +119,7 @@ public final class DomainTransferApproveFlow implements TransactionalFlow {
|
|||
// the transfer period to zero. There is not a transfer cost if the transfer period is zero.
|
||||
Optional<BillingEvent.OneTime> billingEvent =
|
||||
(transferData.getTransferPeriod().getValue() == 0)
|
||||
? Optional.<BillingEvent.OneTime>empty()
|
||||
? Optional.empty()
|
||||
: Optional.of(
|
||||
new BillingEvent.OneTime.Builder()
|
||||
.setReason(Reason.TRANSFER)
|
||||
|
@ -192,7 +192,7 @@ public final class DomainTransferApproveFlow implements TransactionalFlow {
|
|||
(billingEvent.isPresent())
|
||||
? ImmutableSet.of(
|
||||
GracePeriod.forBillingEvent(GracePeriodStatus.TRANSFER, billingEvent.get()))
|
||||
: ImmutableSet.<GracePeriod>of())
|
||||
: ImmutableSet.of())
|
||||
.build();
|
||||
// Create a poll message for the gaining client.
|
||||
PollMessage gainingClientPollMessage = createGainingTransferPollMessage(
|
||||
|
|
|
@ -73,7 +73,6 @@ import google.registry.model.transfer.TransferResponse.DomainTransferResponse;
|
|||
import google.registry.model.transfer.TransferStatus;
|
||||
import java.util.Optional;
|
||||
import javax.inject.Inject;
|
||||
import org.joda.money.Money;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
/**
|
||||
|
@ -160,7 +159,7 @@ public final class DomainTransferRequestFlow implements TransactionalFlow {
|
|||
// If the period is zero, then there is no fee for the transfer.
|
||||
Optional<FeesAndCredits> feesAndCredits =
|
||||
(period.getValue() == 0)
|
||||
? Optional.<FeesAndCredits>empty()
|
||||
? Optional.empty()
|
||||
: Optional.of(pricingLogic.getTransferPrice(registry, targetId, now));
|
||||
if (feesAndCredits.isPresent()) {
|
||||
validateFeeChallenge(targetId, tld, now, feeTransfer, feesAndCredits.get());
|
||||
|
@ -200,7 +199,7 @@ public final class DomainTransferRequestFlow implements TransactionalFlow {
|
|||
gainingClientId,
|
||||
(feesAndCredits.isPresent())
|
||||
? Optional.of(feesAndCredits.get().getTotalCost())
|
||||
: Optional.<Money>empty(),
|
||||
: Optional.empty(),
|
||||
now);
|
||||
// Create the transfer data that represents the pending transfer.
|
||||
TransferData pendingTransferData =
|
||||
|
@ -337,7 +336,7 @@ public final class DomainTransferRequestFlow implements TransactionalFlow {
|
|||
private static ImmutableList<FeeTransformResponseExtension> createResponseExtensions(
|
||||
Optional<FeesAndCredits> feesAndCredits, FeeTransferCommandExtension feeTransfer) {
|
||||
return (feeTransfer == null || !feesAndCredits.isPresent())
|
||||
? ImmutableList.<FeeTransformResponseExtension>of()
|
||||
? ImmutableList.of()
|
||||
: ImmutableList.of(feeTransfer.createResponseBuilder()
|
||||
.setFees(feesAndCredits.get().getFees())
|
||||
.setCredits(feesAndCredits.get().getCredits())
|
||||
|
|
|
@ -121,7 +121,7 @@ public class FlowPicker {
|
|||
/** Session flows like login and logout are keyed only on the {@link InnerCommand} type. */
|
||||
private static final FlowProvider SESSION_FLOW_PROVIDER = new FlowProvider() {
|
||||
private final Map<Class<?>, Class<? extends Flow>> commandFlows =
|
||||
ImmutableMap.<Class<?>, Class<? extends Flow>>of(
|
||||
ImmutableMap.of(
|
||||
Login.class, LoginFlow.class,
|
||||
Logout.class, LogoutFlow.class);
|
||||
|
||||
|
@ -240,7 +240,7 @@ public class FlowPicker {
|
|||
private static final FlowProvider APPLICATION_CRUD_FLOW_PROVIDER = new FlowProvider() {
|
||||
|
||||
private final Map<Class<? extends ResourceCommand>, Class<? extends Flow>> applicationFlows =
|
||||
ImmutableMap.<Class<? extends ResourceCommand>, Class<? extends Flow>>of(
|
||||
ImmutableMap.of(
|
||||
DomainCommand.Create.class, DomainApplicationCreateFlow.class,
|
||||
DomainCommand.Delete.class, DomainApplicationDeleteFlow.class,
|
||||
DomainCommand.Info.class, DomainApplicationInfoFlow.class,
|
||||
|
|
|
@ -203,8 +203,8 @@ public class MapreduceRunner {
|
|||
.setMapper(mapper)
|
||||
.setReducer(reducer)
|
||||
.setOutput(output)
|
||||
.setKeyMarshaller(Marshallers.<K>getSerializationMarshaller())
|
||||
.setValueMarshaller(Marshallers.<V>getSerializationMarshaller())
|
||||
.setKeyMarshaller(Marshallers.getSerializationMarshaller())
|
||||
.setValueMarshaller(Marshallers.getSerializationMarshaller())
|
||||
.setNumReducers(httpParamReduceShards.orElse(defaultReduceShards))
|
||||
.build(),
|
||||
new MapReduceSettings.Builder()
|
||||
|
|
|
@ -41,8 +41,8 @@ class ChildEntityInput<R extends EppResource, I extends ImmutableObject>
|
|||
ImmutableSet<Class<? extends I>> childResourceClasses) {
|
||||
this.resourceClasses = resourceClasses;
|
||||
this.childResourceClasses = childResourceClasses;
|
||||
checkNoInheritanceRelationships(ImmutableSet.<Class<?>>copyOf(resourceClasses));
|
||||
checkNoInheritanceRelationships(ImmutableSet.<Class<?>>copyOf(childResourceClasses));
|
||||
checkNoInheritanceRelationships(ImmutableSet.copyOf(resourceClasses));
|
||||
checkNoInheritanceRelationships(ImmutableSet.copyOf(childResourceClasses));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -137,7 +137,7 @@ abstract class EppResourceBaseReader<T> extends InputReader<T> {
|
|||
ImmutableSet<Class<? extends R>> resourceClasses) {
|
||||
// Ignore EppResource when finding kinds, since it doesn't have one and doesn't imply filtering.
|
||||
return resourceClasses.contains(EppResource.class)
|
||||
? ImmutableSet.<String>of()
|
||||
? ImmutableSet.of()
|
||||
: resourceClasses.stream().map(CLASS_TO_KIND_FUNCTION).collect(toImmutableSet());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ class EppResourceEntityInput<R extends EppResource> extends EppResourceBaseInput
|
|||
|
||||
public EppResourceEntityInput(ImmutableSet<Class<? extends R>> resourceClasses) {
|
||||
this.resourceClasses = resourceClasses;
|
||||
checkNoInheritanceRelationships(ImmutableSet.<Class<?>>copyOf(resourceClasses));
|
||||
checkNoInheritanceRelationships(ImmutableSet.copyOf(resourceClasses));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -29,7 +29,7 @@ class EppResourceIndexReader extends EppResourceBaseReader<EppResourceIndex> {
|
|||
public EppResourceIndexReader(Key<EppResourceIndexBucket> bucketKey) {
|
||||
// Estimate 1MB of memory for this reader, which is massive overkill.
|
||||
// Use an empty set for the filter kinds, which disables filtering.
|
||||
super(bucketKey, ONE_MB, ImmutableSet.<String>of());
|
||||
super(bucketKey, ONE_MB, ImmutableSet.of());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -36,7 +36,7 @@ class EppResourceKeyInput<R extends EppResource> extends EppResourceBaseInput<Ke
|
|||
|
||||
public EppResourceKeyInput(ImmutableSet<Class<? extends R>> resourceClasses) {
|
||||
this.resourceClasses = resourceClasses;
|
||||
checkNoInheritanceRelationships(ImmutableSet.<Class<?>>copyOf(resourceClasses));
|
||||
checkNoInheritanceRelationships(ImmutableSet.copyOf(resourceClasses));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -63,7 +63,7 @@ public final class EntityClasses {
|
|||
/** Set of entity classes. */
|
||||
@SuppressWarnings("unchecked") // varargs
|
||||
public static final ImmutableSet<Class<? extends ImmutableObject>> ALL_CLASSES =
|
||||
ImmutableSet.<Class<? extends ImmutableObject>>of(
|
||||
ImmutableSet.of(
|
||||
BillingEvent.Cancellation.class,
|
||||
BillingEvent.Modification.class,
|
||||
BillingEvent.OneTime.class,
|
||||
|
|
|
@ -164,7 +164,7 @@ public final class EppResourceUtils {
|
|||
ofy().load().type(clazz)
|
||||
.filter(filterDefinition, filterValue)
|
||||
.filter("deletionTime >", now.toDate()),
|
||||
EppResourceUtils.<T>transformAtTime(now));
|
||||
EppResourceUtils.transformAtTime(now));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -211,7 +211,7 @@ public final class RegistrarCreditBalance extends ImmutableObject implements Bui
|
|||
private Optional<Money> getMostRecentlyWrittenBalance(
|
||||
Map.Entry<DateTime, ImmutableSortedMap<DateTime, Money>> balancesAtEffectiveTime) {
|
||||
return balancesAtEffectiveTime == null
|
||||
? Optional.<Money>empty()
|
||||
? Optional.empty()
|
||||
// Don't use Optional.ofNullable() here since it's an error if there's a empty submap.
|
||||
: Optional.of(balancesAtEffectiveTime.getValue().lastEntry().getValue());
|
||||
}
|
||||
|
|
|
@ -162,7 +162,7 @@ public class TimedTransitionProperty<V, T extends TimedTransitionProperty.TimedT
|
|||
Map<DateTime, V> newInnerMap = new HashMap<>(currentMap);
|
||||
newInnerMap.put(transitionTime, transitionValue);
|
||||
ImmutableSortedMap<DateTime, V> newMap =
|
||||
ImmutableSortedMap.<DateTime, V>copyOf(newInnerMap);
|
||||
ImmutableSortedMap.copyOf(newInnerMap);
|
||||
validateTimedTransitionMap(newMap, allowedTransitions, allowedTransitionMapName);
|
||||
return fromValueMap(newMap, transitionClass);
|
||||
}
|
||||
|
|
|
@ -277,7 +277,7 @@ public class DomainResource extends DomainBase
|
|||
transferData.getServerApproveBillingEvent())));
|
||||
} else {
|
||||
// There won't be a billing event, so we don't need a grace period
|
||||
builder.setGracePeriods(ImmutableSet.<GracePeriod>of());
|
||||
builder.setGracePeriods(ImmutableSet.of());
|
||||
}
|
||||
// Set all remaining transfer properties.
|
||||
setAutomaticTransferSuccessProperties(builder, transferData);
|
||||
|
|
|
@ -131,7 +131,7 @@ public class EppInput extends ImmutableObject {
|
|||
ResourceCommand resourceCommand = getResourceCommand();
|
||||
return resourceCommand instanceof SingleResourceCommand
|
||||
? Optional.of(((SingleResourceCommand) resourceCommand).getTargetId())
|
||||
: Optional.<String>empty();
|
||||
: Optional.empty();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -134,7 +134,7 @@ public class DomainApplicationIndex extends BackupGroupRoot {
|
|||
public static DomainApplicationIndex createUpdatedInstance(DomainApplication application) {
|
||||
DomainApplicationIndex existing = load(application.getFullyQualifiedDomainName());
|
||||
ImmutableSet<Key<DomainApplication>> newKeys = CollectionUtils.union(
|
||||
(existing == null ? ImmutableSet.<Key<DomainApplication>>of() : existing.getKeys()),
|
||||
(existing == null ? ImmutableSet.of() : existing.getKeys()),
|
||||
Key.create(application));
|
||||
return createWithSpecifiedKeys(application.getFullyQualifiedDomainName(), newKeys);
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@ public abstract class ForeignKeyIndex<E extends EppResource> extends BackupGroup
|
|||
static final ImmutableMap<
|
||||
Class<? extends EppResource>, Class<? extends ForeignKeyIndex<?>>>
|
||||
RESOURCE_CLASS_TO_FKI_CLASS =
|
||||
ImmutableMap.<Class<? extends EppResource>, Class<? extends ForeignKeyIndex<?>>>of(
|
||||
ImmutableMap.of(
|
||||
ContactResource.class, ForeignKeyContactIndex.class,
|
||||
DomainResource.class, ForeignKeyDomainIndex.class,
|
||||
HostResource.class, ForeignKeyHostIndex.class);
|
||||
|
@ -119,7 +119,7 @@ public abstract class ForeignKeyIndex<E extends EppResource> extends BackupGroup
|
|||
public static <E extends EppResource> Key<ForeignKeyIndex<E>> createKey(E resource) {
|
||||
@SuppressWarnings("unchecked")
|
||||
Class<E> resourceClass = (Class<E>) resource.getClass();
|
||||
return Key.<ForeignKeyIndex<E>>create(mapToFkiClass(resourceClass), resource.getForeignKey());
|
||||
return Key.create(mapToFkiClass(resourceClass), resource.getForeignKey());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -50,13 +50,13 @@ abstract class AugmentedDeleter implements Deleter {
|
|||
|
||||
@Override
|
||||
public Result<Void> entity(Object entity) {
|
||||
handleDeletion(Arrays.<Key<?>>asList(Key.create(entity)));
|
||||
handleDeletion(Arrays.asList(Key.create(entity)));
|
||||
return delegate.entity(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<Void> key(Key<?> key) {
|
||||
handleDeletion(Arrays.<Key<?>>asList(key));
|
||||
handleDeletion(Arrays.asList(key));
|
||||
return delegate.keys(key);
|
||||
}
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@ import org.joda.time.DateTime;
|
|||
/** Metadata for an {@link Ofy} transaction that saves commit logs. */
|
||||
class TransactionInfo {
|
||||
|
||||
private static final Predicate<Object> IS_DELETE = Predicates.<Object>equalTo(Delete.SENTINEL);
|
||||
private static final Predicate<Object> IS_DELETE = Predicates.equalTo(Delete.SENTINEL);
|
||||
|
||||
private enum Delete { SENTINEL }
|
||||
|
||||
|
|
|
@ -221,8 +221,9 @@ public abstract class PollMessage extends ImmutableObject
|
|||
|
||||
@Override
|
||||
public ImmutableList<ResponseExtension> getResponseExtensions() {
|
||||
return (launchInfoResponseExtension == null) ? ImmutableList.<ResponseExtension>of() :
|
||||
ImmutableList.<ResponseExtension>of(launchInfoResponseExtension);
|
||||
return (launchInfoResponseExtension == null)
|
||||
? ImmutableList.of()
|
||||
: ImmutableList.of(launchInfoResponseExtension);
|
||||
}
|
||||
|
||||
/** A builder for {@link OneTime} since it is immutable. */
|
||||
|
@ -313,7 +314,7 @@ public abstract class PollMessage extends ImmutableObject
|
|||
public ImmutableList<ResponseData> getResponseData() {
|
||||
// Note that the event time is when the auto-renew occured, so the expiration time in the
|
||||
// response should be 1 year past that, since it denotes the new expiration time.
|
||||
return ImmutableList.<ResponseData>of(
|
||||
return ImmutableList.of(
|
||||
DomainRenewData.create(getTargetId(), getEventTime().plusYears(1)));
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ public class PollMessageExternalKeyConverter extends Converter<Key<PollMessage>,
|
|||
* belongs to.
|
||||
*/
|
||||
public static final ImmutableBiMap<Class<? extends EppResource>, Long> EXTERNAL_KEY_CLASS_ID_MAP =
|
||||
ImmutableBiMap.<Class<? extends EppResource>, Long>of(
|
||||
ImmutableBiMap.of(
|
||||
DomainBase.class, 1L,
|
||||
ContactResource.class, 2L,
|
||||
HostResource.class, 3L);
|
||||
|
|
|
@ -54,6 +54,6 @@ public final class StaticPremiumListPricingEngine implements PremiumPricingEngin
|
|||
premiumPrice.isPresent(),
|
||||
premiumPrice.orElse(registry.getStandardCreateCost()),
|
||||
premiumPrice.orElse(registry.getStandardRenewCost(priceTime)),
|
||||
Optional.<String>ofNullable(feeClass));
|
||||
Optional.ofNullable(feeClass));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -132,7 +132,7 @@ public abstract class BaseDomainLabelList<T extends Comparable<?>, R extends Dom
|
|||
} else {
|
||||
line = line.trim();
|
||||
}
|
||||
return line.isEmpty() ? ImmutableList.<String>of() : ImmutableList.<String>of(line, comment);
|
||||
return line.isEmpty() ? ImmutableList.of() : ImmutableList.of(line, comment);
|
||||
}
|
||||
|
||||
/** Gets the names of the tlds that reference this list. */
|
||||
|
|
|
@ -73,7 +73,7 @@ public final class PremiumListUtils {
|
|||
public static Optional<Money> getPremiumPrice(String label, Registry registry) {
|
||||
// If the registry has no configured premium list, then no labels are premium.
|
||||
if (registry.getPremiumList() == null) {
|
||||
return Optional.<Money>empty();
|
||||
return Optional.empty();
|
||||
}
|
||||
DateTime startTime = DateTime.now(UTC);
|
||||
String listName = registry.getPremiumList().getName();
|
||||
|
@ -103,7 +103,7 @@ public final class PremiumListUtils {
|
|||
|
||||
private static CheckResults checkStatus(PremiumListRevision premiumListRevision, String label) {
|
||||
if (!premiumListRevision.getProbablePremiumLabels().mightContain(label)) {
|
||||
return CheckResults.create(BLOOM_FILTER_NEGATIVE, Optional.<Money>empty());
|
||||
return CheckResults.create(BLOOM_FILTER_NEGATIVE, Optional.empty());
|
||||
}
|
||||
|
||||
Key<PremiumListEntry> entryKey =
|
||||
|
@ -115,7 +115,7 @@ public final class PremiumListUtils {
|
|||
if (entry.isPresent()) {
|
||||
return CheckResults.create(CACHED_POSITIVE, Optional.of(entry.get().getValue()));
|
||||
} else {
|
||||
return CheckResults.create(CACHED_NEGATIVE, Optional.<Money>empty());
|
||||
return CheckResults.create(CACHED_NEGATIVE, Optional.empty());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ public final class PremiumListUtils {
|
|||
if (entry.isPresent()) {
|
||||
return CheckResults.create(UNCACHED_POSITIVE, Optional.of(entry.get().getValue()));
|
||||
} else {
|
||||
return CheckResults.create(UNCACHED_NEGATIVE, Optional.<Money>empty());
|
||||
return CheckResults.create(UNCACHED_NEGATIVE, Optional.empty());
|
||||
}
|
||||
} catch (InvalidCacheLoadException | ExecutionException e) {
|
||||
throw new RuntimeException("Could not load premium list entry " + entryKey, e);
|
||||
|
|
|
@ -29,7 +29,7 @@ final class MetricMetrics {
|
|||
"/metrics/push_intervals",
|
||||
"Count of push intervals.",
|
||||
"Push Intervals",
|
||||
ImmutableSet.<LabelDescriptor>of());
|
||||
ImmutableSet.of());
|
||||
private static final ImmutableSet<LabelDescriptor> LABELS =
|
||||
ImmutableSet.of(
|
||||
LabelDescriptor.create("kind", "Metric Kind"),
|
||||
|
|
|
@ -117,7 +117,7 @@ public class MetricReporter extends AbstractScheduledService {
|
|||
runOneIteration();
|
||||
|
||||
// Offer a poision pill to inform the exporter to stop.
|
||||
writeQueue.offer(Optional.<ImmutableList<MetricPoint<?>>>empty());
|
||||
writeQueue.offer(Optional.empty());
|
||||
try {
|
||||
metricExporter.awaitTerminated(10, TimeUnit.SECONDS);
|
||||
logger.info("Shut down MetricExporter");
|
||||
|
|
|
@ -382,7 +382,7 @@ public class StackdriverWriter implements MetricWriter {
|
|||
|
||||
List<LabelDescriptor> encodedLabels = descriptor.getLabels();
|
||||
// The MetricDescriptors returned by the GCM API have null fields rather than empty lists
|
||||
encodedLabels = encodedLabels == null ? ImmutableList.<LabelDescriptor>of() : encodedLabels;
|
||||
encodedLabels = encodedLabels == null ? ImmutableList.of() : encodedLabels;
|
||||
|
||||
ImmutableMap.Builder<String, String> labelValues = new ImmutableMap.Builder<>();
|
||||
int i = 0;
|
||||
|
|
|
@ -178,7 +178,7 @@ public abstract class EppMetric implements BigQueryMetric {
|
|||
public Builder setTlds(ImmutableSet<String> tlds) {
|
||||
switch (tlds.size()) {
|
||||
case 0:
|
||||
setTld(Optional.<String>empty());
|
||||
setTld(Optional.empty());
|
||||
break;
|
||||
case 1:
|
||||
String tld = Iterables.getOnlyElement(tlds);
|
||||
|
|
|
@ -67,7 +67,7 @@ public class MetricsExportAction implements Runnable {
|
|||
// Filter out the special parameters that the Action is called with. Everything that's left
|
||||
// is returned in a Map that is suitable to pass to Bigquery as row data.
|
||||
Map<String, Object> jsonRows =
|
||||
ImmutableMap.<String, Object>copyOf(
|
||||
ImmutableMap.copyOf(
|
||||
filterKeys(parameters, not(in(SPECIAL_PARAMS))).entries());
|
||||
TableDataInsertAllResponse response = bigquery.tabledata()
|
||||
.insertAll(
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ public class RdeImportUtils {
|
|||
resource.getClass().getCanonicalName(),
|
||||
resource.getForeignKey(),
|
||||
resource.getRepoId());
|
||||
return ImmutableSet.<Object>of(ForeignKeyIndex.create(resource, resource.getDeletionTime()),
|
||||
return ImmutableSet.of(ForeignKeyIndex.create(resource, resource.getDeletionTime()),
|
||||
EppResourceIndex.create(Key.create(resource)));
|
||||
}
|
||||
|
||||
|
|
|
@ -191,7 +191,7 @@ final class XjcToDomainResourceConverter extends XjcToEppResourceConverter {
|
|||
.collect(toImmutableSet()))
|
||||
.setDsData(
|
||||
domain.getSecDNS() == null
|
||||
? ImmutableSet.<DelegationSignerData>of()
|
||||
? ImmutableSet.of()
|
||||
: domain
|
||||
.getSecDNS()
|
||||
.getDsDatas()
|
||||
|
|
|
@ -245,7 +245,7 @@ public final class Modules {
|
|||
// GoogleCredential constructor. We don't yet know the actual scopes to use here, and it
|
||||
// is thus the responsibility of every user of a delegated admin credential to call
|
||||
// createScoped() on it first to get the version with the correct scopes set.
|
||||
.setServiceAccountScopes(ImmutableSet.<String>of())
|
||||
.setServiceAccountScopes(ImmutableSet.of())
|
||||
.setServiceAccountUser(gSuiteAdminAccountEmailAddress)
|
||||
.build();
|
||||
}
|
||||
|
|
|
@ -70,7 +70,7 @@ public final class RequestParameters {
|
|||
String stringParam = req.getParameter(name);
|
||||
try {
|
||||
return isNullOrEmpty(stringParam)
|
||||
? Optional.<Integer>empty()
|
||||
? Optional.empty()
|
||||
: Optional.of(Integer.valueOf(stringParam));
|
||||
} catch (NumberFormatException e) {
|
||||
throw new BadRequestException("Expected integer: " + name);
|
||||
|
@ -93,7 +93,7 @@ public final class RequestParameters {
|
|||
/** Returns all GET or POST parameters associated with {@code name}. */
|
||||
public static ImmutableSet<String> extractSetOfParameters(HttpServletRequest req, String name) {
|
||||
String[] parameters = req.getParameterValues(name);
|
||||
return parameters == null ? ImmutableSet.<String>of() : ImmutableSet.copyOf(parameters);
|
||||
return parameters == null ? ImmutableSet.of() : ImmutableSet.copyOf(parameters);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -135,7 +135,7 @@ public final class RequestParameters {
|
|||
HttpServletRequest req, String name) {
|
||||
String stringParam = req.getParameter(name);
|
||||
return isNullOrEmpty(stringParam)
|
||||
? Optional.<Boolean>empty()
|
||||
? Optional.empty()
|
||||
: Optional.of(Boolean.valueOf(stringParam));
|
||||
}
|
||||
|
||||
|
@ -179,7 +179,7 @@ public final class RequestParameters {
|
|||
String stringParam = req.getParameter(name);
|
||||
try {
|
||||
return isNullOrEmpty(stringParam)
|
||||
? Optional.<DateTime>empty()
|
||||
? Optional.empty()
|
||||
: Optional.of(DateTime.parse(stringParam));
|
||||
} catch (IllegalArgumentException e) {
|
||||
throw new BadRequestException("Bad ISO 8601 timestamp: " + name);
|
||||
|
@ -198,7 +198,7 @@ public final class RequestParameters {
|
|||
HttpServletRequest req, String name) {
|
||||
String[] stringParams = req.getParameterValues(name);
|
||||
if (stringParams == null) {
|
||||
return ImmutableSet.<DateTime>of();
|
||||
return ImmutableSet.of();
|
||||
}
|
||||
ImmutableSet.Builder<DateTime> datesBuilder = new ImmutableSet.Builder<>();
|
||||
for (String stringParam : stringParams) {
|
||||
|
|
|
@ -30,7 +30,7 @@ public class AuthModule {
|
|||
@Provides
|
||||
ImmutableList<AuthenticationMechanism> provideApiAuthenticationMechanisms(
|
||||
OAuthAuthenticationMechanism oauthAuthenticationMechanism) {
|
||||
return ImmutableList.<AuthenticationMechanism>of(
|
||||
return ImmutableList.of(
|
||||
oauthAuthenticationMechanism);
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ public abstract class AuthResult {
|
|||
}
|
||||
|
||||
public static AuthResult create(AuthLevel authLevel) {
|
||||
return new AutoValue_AuthResult(authLevel, Optional.<UserAuthInfo>empty());
|
||||
return new AutoValue_AuthResult(authLevel, Optional.empty());
|
||||
}
|
||||
|
||||
public static AuthResult create(AuthLevel authLevel, @Nullable UserAuthInfo userAuthInfo) {
|
||||
|
|
|
@ -39,7 +39,7 @@ public abstract class UserAuthInfo {
|
|||
|
||||
public static UserAuthInfo create(
|
||||
User user, boolean isUserAdmin) {
|
||||
return new AutoValue_UserAuthInfo(user, isUserAdmin, Optional.<OAuthTokenInfo>empty());
|
||||
return new AutoValue_UserAuthInfo(user, isUserAdmin, Optional.empty());
|
||||
}
|
||||
|
||||
public static UserAuthInfo create(
|
||||
|
|
|
@ -33,7 +33,7 @@ public final class JsonResponseHelper {
|
|||
/** Creates a JSON response message securely to the browser client with a parser breaker. */
|
||||
public static ImmutableMap<String, Object> create(
|
||||
Status status, String message, Iterable<? extends Map<String, ?>> results) {
|
||||
return ImmutableMap.<String, Object>of(
|
||||
return ImmutableMap.of(
|
||||
"status", status.toString(),
|
||||
"message", checkNotNull(message, "message"),
|
||||
"results", ImmutableList.copyOf(results));
|
||||
|
@ -41,7 +41,7 @@ public final class JsonResponseHelper {
|
|||
|
||||
/** Same as {@link #create(Status, String, Iterable)} but with zero results. */
|
||||
public static ImmutableMap<String, Object> create(Status status, String message) {
|
||||
return create(status, message, ImmutableList.<Map<String, ?>>of());
|
||||
return create(status, message, ImmutableList.of());
|
||||
}
|
||||
|
||||
/** Same as {@link #create(Status, String, Iterable)} but with only one results. */
|
||||
|
@ -53,7 +53,7 @@ public final class JsonResponseHelper {
|
|||
/** Creates a JSON response message when a submitted form field is invalid. */
|
||||
public static ImmutableMap<String, Object> createFormFieldError(
|
||||
String message, String formFieldName) {
|
||||
return ImmutableMap.<String, Object>of(
|
||||
return ImmutableMap.of(
|
||||
"status", Status.ERROR.toString(),
|
||||
"message", checkNotNull(message, "message"),
|
||||
"field", checkNotNull(formFieldName, "formFieldName"),
|
||||
|
|
|
@ -122,7 +122,7 @@ public final class IdnTable {
|
|||
}
|
||||
|
||||
int codepoint = readCodepoint(line);
|
||||
rangeSet.add(Range.<Integer>singleton(codepoint));
|
||||
rangeSet.add(Range.singleton(codepoint));
|
||||
}
|
||||
return new IdnTable(language, url, policy, rangeSet.build(), languageValidator);
|
||||
}
|
||||
|
|
|
@ -53,9 +53,9 @@ class JapaneseLanguageValidator extends LanguageValidator {
|
|||
*/
|
||||
private static final ImmutableRangeSet<Integer> JAPANESE_EXCEPTION_CODEPOINTS =
|
||||
new ImmutableRangeSet.Builder<Integer>()
|
||||
.add(Range.<Integer>singleton(IDEOGRAPHIC_CLOSING_MARK))
|
||||
.add(Range.<Integer>singleton(KATAKANA_MIDDLE_DOT))
|
||||
.add(Range.<Integer>singleton(KATAKANA_HIRAGANA_PROLONGED_SOUND_MARK))
|
||||
.add(Range.singleton(IDEOGRAPHIC_CLOSING_MARK))
|
||||
.add(Range.singleton(KATAKANA_MIDDLE_DOT))
|
||||
.add(Range.singleton(KATAKANA_HIRAGANA_PROLONGED_SOUND_MARK))
|
||||
.build();
|
||||
|
||||
@Override
|
||||
|
|
|
@ -21,7 +21,7 @@ abstract class LanguageValidator {
|
|||
|
||||
/** A registry of all known language validators keyed by their language code. */
|
||||
private static final ImmutableMap<String, LanguageValidator> LANGUAGE_VALIDATORS =
|
||||
ImmutableMap.<String, LanguageValidator>of("ja", new JapaneseLanguageValidator());
|
||||
ImmutableMap.of("ja", new JapaneseLanguageValidator());
|
||||
|
||||
/** Return the language validator for the given language code (if one exists). */
|
||||
static Optional<LanguageValidator> get(String language) {
|
||||
|
|
|
@ -45,7 +45,7 @@ public final class TmchCrlAction implements Runnable {
|
|||
public void run() {
|
||||
try {
|
||||
tmchCertificateAuthority.updateCrl(
|
||||
new String(marksdb.fetch(tmchCrlUrl, Optional.<String>empty()), UTF_8),
|
||||
new String(marksdb.fetch(tmchCrlUrl, Optional.empty()), UTF_8),
|
||||
tmchCrlUrl.toString());
|
||||
} catch (IOException | GeneralSecurityException e) {
|
||||
throw new RuntimeException("Failed to update ICANN TMCH CRL.", e);
|
||||
|
|
|
@ -129,7 +129,7 @@ class AppEngineConnection implements Connection {
|
|||
public Map<String, Object> sendJson(String endpoint, Map<String, ?> object) throws IOException {
|
||||
String response = send(
|
||||
endpoint,
|
||||
ImmutableMap.<String, Object>of(),
|
||||
ImmutableMap.of(),
|
||||
JSON_UTF_8,
|
||||
JSONValue.toJSONString(object).getBytes(UTF_8));
|
||||
return (Map<String, Object>) JSONValue.parse(response.substring(JSON_SAFETY_PREFIX.length()));
|
||||
|
|
|
@ -109,6 +109,6 @@ class CreateTldCommand extends CreateOrUpdateTldCommand {
|
|||
Optional<Map.Entry<DateTime, TldState>> getTldStateTransitionToAdd() {
|
||||
return initialTldState != null
|
||||
? Optional.of(Maps.immutableEntry(START_OF_TIME, initialTldState))
|
||||
: Optional.<Map.Entry<DateTime, TldState>>empty();
|
||||
: Optional.empty();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -192,7 +192,7 @@ final class GenerateAuctionDataCommand implements RemoteApiCommand {
|
|||
Optional<ContactAddress> address =
|
||||
Optional.ofNullable(postalInfo.isPresent() ? postalInfo.get().getAddress() : null);
|
||||
List<String> street =
|
||||
address.isPresent() ? address.get().getStreet() : ImmutableList.<String>of();
|
||||
address.isPresent() ? address.get().getStreet() : ImmutableList.of();
|
||||
Optional<ContactPhoneNumber> phoneNumber = Optional.ofNullable(registrant.getVoiceNumber());
|
||||
|
||||
// Each line containing an auction participant has the following format:
|
||||
|
@ -235,7 +235,7 @@ final class GenerateAuctionDataCommand implements RemoteApiCommand {
|
|||
Optional.ofNullable(registrar.getLocalizedAddress())
|
||||
.orElse(registrar.getInternationalizedAddress()));
|
||||
List<String> street =
|
||||
address.isPresent() ? address.get().getStreet() : ImmutableList.<String>of();
|
||||
address.isPresent() ? address.get().getStreet() : ImmutableList.of();
|
||||
|
||||
// Each line containing the registrar of an auction participant has the following format:
|
||||
//
|
||||
|
|
|
@ -99,7 +99,7 @@ final class GetSchemaTreeCommand implements Command {
|
|||
// Build up the superclass to subclass mapping.
|
||||
superclassToSubclasses = Multimaps.invertFrom(
|
||||
Multimaps.forMap(subclassToSuperclass),
|
||||
TreeMultimap.<Class<?>, Class<?>>create(arbitrary(), new PrintableNameOrdering()));
|
||||
TreeMultimap.create(arbitrary(), new PrintableNameOrdering()));
|
||||
printTree(Object.class, 0);
|
||||
}
|
||||
|
||||
|
|
|
@ -44,6 +44,6 @@ final class ListDomainsCommand extends ListObjectsCommand {
|
|||
ImmutableMap<String, Object> getParameterMap() {
|
||||
String tldsParam = Joiner.on(',').join(tlds);
|
||||
checkArgument(tldsParam.length() < 1024, "Total length of TLDs is too long for URL parameter");
|
||||
return ImmutableMap.<String, Object>of("tlds", tldsParam);
|
||||
return ImmutableMap.of("tlds", tldsParam);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ enum RegistryToolEnvironment {
|
|||
}
|
||||
|
||||
private RegistryToolEnvironment(RegistryEnvironment actualEnvironment) {
|
||||
this(actualEnvironment, ImmutableMap.<String, String>of());
|
||||
this(actualEnvironment, ImmutableMap.of());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -201,16 +201,16 @@ final class SetupOteCommand extends ConfirmingCommand implements RemoteApiComman
|
|||
|
||||
// Storing names and credentials in a list of tuples for later play-back.
|
||||
List<List<String>> registrars = new ArrayList<>();
|
||||
registrars.add(ImmutableList.<String>of(
|
||||
registrars.add(ImmutableList.of(
|
||||
registrar + "-1", passwordGenerator.createString(PASSWORD_LENGTH),
|
||||
registrar + "-sunrise"));
|
||||
registrars.add(ImmutableList.<String>of(
|
||||
registrars.add(ImmutableList.of(
|
||||
registrar + "-2", passwordGenerator.createString(PASSWORD_LENGTH),
|
||||
registrar + "-landrush"));
|
||||
registrars.add(ImmutableList.<String>of(
|
||||
registrars.add(ImmutableList.of(
|
||||
registrar + "-3", passwordGenerator.createString(PASSWORD_LENGTH),
|
||||
registrar + "-ga"));
|
||||
registrars.add(ImmutableList.<String>of(
|
||||
registrars.add(ImmutableList.of(
|
||||
registrar + "-4", passwordGenerator.createString(PASSWORD_LENGTH),
|
||||
registrar + "-ga"));
|
||||
|
||||
|
|
|
@ -123,7 +123,7 @@ class UpdateTldCommand extends CreateOrUpdateTldCommand {
|
|||
Optional<Map.Entry<DateTime, TldState>> getTldStateTransitionToAdd() {
|
||||
return setCurrentTldState != null
|
||||
? Optional.of(Maps.immutableEntry(DateTime.now(DateTimeZone.UTC), setCurrentTldState))
|
||||
: Optional.<Map.Entry<DateTime, TldState>>empty();
|
||||
: Optional.empty();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -25,6 +25,6 @@ public abstract class EnumParameter<T extends Enum<T>> extends ParameterConverte
|
|||
|
||||
@Override
|
||||
public T convert(String value) {
|
||||
return Enum.<T>valueOf(new TypeInstantiator<T>(getClass()){}.getExactType(), value);
|
||||
return Enum.valueOf(new TypeInstantiator<T>(getClass()){}.getExactType(), value);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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).
|
||||
|
|
|
@ -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. */
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -137,7 +137,7 @@ public final class FormField<I, O> {
|
|||
/** Returns an optional form field named {@code name} with a specific {@code inputType}. */
|
||||
public static <T> Builder<T, T> named(String name, Class<T> typeIn) {
|
||||
checkArgument(!name.isEmpty());
|
||||
return new Builder<>(name, checkNotNull(typeIn), typeIn, Functions.<T>identity());
|
||||
return new Builder<>(name, checkNotNull(typeIn), typeIn, Functions.identity());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -43,7 +43,6 @@ import google.registry.security.JsonResponseHelper;
|
|||
import google.registry.ui.forms.FormException;
|
||||
import google.registry.ui.forms.FormFieldException;
|
||||
import google.registry.ui.server.RegistrarFormFields;
|
||||
import google.registry.util.CidrAddressBlock;
|
||||
import google.registry.util.CollectionUtils;
|
||||
import google.registry.util.DiffUtils;
|
||||
import java.util.HashSet;
|
||||
|
@ -192,7 +191,7 @@ public class RegistrarSettingsAction implements Runnable, JsonActionRunner.JsonA
|
|||
builder.setIpAddressWhitelist(
|
||||
RegistrarFormFields.IP_ADDRESS_WHITELIST_FIELD
|
||||
.extractUntyped(args)
|
||||
.orElse(ImmutableList.<CidrAddressBlock>of()));
|
||||
.orElse(ImmutableList.of()));
|
||||
RegistrarFormFields.CLIENT_CERTIFICATE_FIELD
|
||||
.extractUntyped(args)
|
||||
.ifPresent(
|
||||
|
|
|
@ -85,28 +85,28 @@ public class CollectionUtils {
|
|||
|
||||
/** Defensive copy helper for {@link Set}. */
|
||||
public static <V> ImmutableSet<V> nullToEmptyImmutableCopy(Set<V> data) {
|
||||
return data == null ? ImmutableSet.<V>of() : ImmutableSet.copyOf(data);
|
||||
return data == null ? ImmutableSet.of() : ImmutableSet.copyOf(data);
|
||||
}
|
||||
|
||||
/** Defensive copy helper for {@link Set}. */
|
||||
public static <V extends Comparable<V>>
|
||||
ImmutableSortedSet<V> nullToEmptyImmutableSortedCopy(Set<V> data) {
|
||||
return data == null ? ImmutableSortedSet.<V>of() : ImmutableSortedSet.copyOf(data);
|
||||
return data == null ? ImmutableSortedSet.of() : ImmutableSortedSet.copyOf(data);
|
||||
}
|
||||
|
||||
/** Defensive copy helper for {@link SortedMap}. */
|
||||
public static <K, V> ImmutableSortedMap<K, V> nullToEmptyImmutableCopy(SortedMap<K, V> data) {
|
||||
return data == null ? ImmutableSortedMap.<K, V>of() : ImmutableSortedMap.copyOfSorted(data);
|
||||
return data == null ? ImmutableSortedMap.of() : ImmutableSortedMap.copyOfSorted(data);
|
||||
}
|
||||
|
||||
/** Defensive copy helper for {@link List}. */
|
||||
public static <V> ImmutableList<V> nullToEmptyImmutableCopy(List<V> data) {
|
||||
return data == null ? ImmutableList.<V>of() : ImmutableList.copyOf(data);
|
||||
return data == null ? ImmutableList.of() : ImmutableList.copyOf(data);
|
||||
}
|
||||
|
||||
/** Defensive copy helper for {@link Map}. */
|
||||
public static <K, V> ImmutableMap<K, V> nullToEmptyImmutableCopy(Map<K, V> data) {
|
||||
return data == null ? ImmutableMap.<K, V>of() : ImmutableMap.copyOf(data);
|
||||
return data == null ? ImmutableMap.of() : ImmutableMap.copyOf(data);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -42,7 +42,7 @@ public final class SqlTemplate {
|
|||
|
||||
/** Returns a new immutable SQL template builder object, for query parameter substitution. */
|
||||
public static SqlTemplate create(String template) {
|
||||
return new SqlTemplate(template, ImmutableMap.<String, String>of());
|
||||
return new SqlTemplate(template, ImmutableMap.of());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -35,7 +35,6 @@ import java.security.cert.CertificateException;
|
|||
import java.security.cert.CertificateFactory;
|
||||
import java.security.cert.CertificateParsingException;
|
||||
import java.security.cert.CertificateRevokedException;
|
||||
import java.security.cert.Extension;
|
||||
import java.security.cert.X509CRL;
|
||||
import java.security.cert.X509CRLEntry;
|
||||
import java.security.cert.X509Certificate;
|
||||
|
@ -149,7 +148,7 @@ public final class X509Utils {
|
|||
checkNotNull(entry.getRevocationDate(), "revocationDate"),
|
||||
checkNotNull(entry.getRevocationReason(), "revocationReason"),
|
||||
firstNonNull(entry.getCertificateIssuer(), crl.getIssuerX500Principal()),
|
||||
ImmutableMap.<String, Extension>of());
|
||||
ImmutableMap.of());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ public class DomainLookupCommand extends DomainOrHostLookupCommand {
|
|||
protected Optional<WhoisResponse> getResponse(InternetDomainName domainName, DateTime now) {
|
||||
final DomainResource domainResource =
|
||||
loadByForeignKey(DomainResource.class, domainName.toString(), now);
|
||||
return Optional.<WhoisResponse>ofNullable(
|
||||
return Optional.ofNullable(
|
||||
domainResource == null ? null : new DomainWhoisResponse(domainResource, now));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,7 +32,7 @@ public class NameserverLookupByHostCommand extends DomainOrHostLookupCommand {
|
|||
protected Optional<WhoisResponse> getResponse(InternetDomainName hostName, DateTime now) {
|
||||
final HostResource hostResource =
|
||||
loadByForeignKey(HostResource.class, hostName.toString(), now);
|
||||
return Optional.<WhoisResponse>ofNullable(
|
||||
return Optional.ofNullable(
|
||||
hostResource == null ? null : new NameserverWhoisResponse(hostResource, now));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -240,7 +240,7 @@ public class XmlTransformer {
|
|||
*/
|
||||
public void marshalStrict(Object root, Result result) throws XmlException {
|
||||
try {
|
||||
getMarshaller(schema, ImmutableMap.<String, Object>of())
|
||||
getMarshaller(schema, ImmutableMap.of())
|
||||
.marshal(checkNotNull(root, "root"), checkNotNull(result, "result"));
|
||||
} catch (JAXBException e) {
|
||||
throw new XmlException(e);
|
||||
|
|
|
@ -116,7 +116,7 @@ public class DeleteProberDataActionTest extends MapreduceTestCase<DeleteProberDa
|
|||
Set<ImmutableObject> ibEntities = persistLotsOfDomains("ib-any.test");
|
||||
runMapreduce();
|
||||
assertDeleted(ibEntities);
|
||||
assertNotDeleted(ImmutableSet.<ImmutableObject>of(nic, fkiNic));
|
||||
assertNotDeleted(ImmutableSet.of(nic, fkiNic));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -254,7 +254,7 @@ public class DeleteProberDataActionTest extends MapreduceTestCase<DeleteProberDa
|
|||
ForeignKeyIndex.load(DomainResource.class, fqdn, START_OF_TIME);
|
||||
EppResourceIndex eppIndex =
|
||||
ofy().load().entity(EppResourceIndex.create(Key.create(domain))).now();
|
||||
return ImmutableSet.<ImmutableObject>of(
|
||||
return ImmutableSet.of(
|
||||
domain, historyEntry, billingEvent, pollMessage, fki, eppIndex);
|
||||
}
|
||||
|
||||
|
|
|
@ -265,7 +265,7 @@ public class MapreduceEntityCleanupActionTest
|
|||
createMapreduce("jobname");
|
||||
executeTasksUntilEmpty(QUEUE_NAME, clock);
|
||||
setJobIdJobNameAndDaysOld(
|
||||
Optional.<String>empty(), Optional.<String>empty(), Optional.<Integer>empty());
|
||||
Optional.empty(), Optional.empty(), Optional.empty());
|
||||
|
||||
action.run();
|
||||
|
||||
|
@ -349,11 +349,11 @@ public class MapreduceEntityCleanupActionTest
|
|||
executeTasksUntilEmpty(QUEUE_NAME, clock);
|
||||
clock.setTo(DateTime.now(UTC));
|
||||
action = new MapreduceEntityCleanupAction(
|
||||
Optional.<String>empty(), // jobId
|
||||
Optional.<String>empty(), // jobName
|
||||
Optional.<Integer>of(1), // numJobsToDelete
|
||||
Optional.<Integer>of(0), // daysOld
|
||||
Optional.<Boolean>empty(), // force
|
||||
Optional.empty(), // jobId
|
||||
Optional.empty(), // jobName
|
||||
Optional.of(1), // numJobsToDelete
|
||||
Optional.of(0), // daysOld
|
||||
Optional.empty(), // force
|
||||
mapreduceEntityCleanupUtil,
|
||||
clock,
|
||||
DatastoreServiceFactory.getDatastoreService(),
|
||||
|
@ -428,10 +428,10 @@ public class MapreduceEntityCleanupActionTest
|
|||
clock.setTo(DateTime.now(UTC));
|
||||
action = new MapreduceEntityCleanupAction(
|
||||
Optional.of(jobId2), // jobId
|
||||
Optional.<String>empty(), // jobName
|
||||
Optional.<Integer>empty(), // numJobsToDelete
|
||||
Optional.<Integer>empty(), // daysOld
|
||||
Optional.<Boolean>empty(), // force
|
||||
Optional.empty(), // jobName
|
||||
Optional.empty(), // numJobsToDelete
|
||||
Optional.empty(), // daysOld
|
||||
Optional.empty(), // force
|
||||
mapreduceEntityCleanupUtil,
|
||||
clock,
|
||||
DatastoreServiceFactory.getDatastoreService(),
|
||||
|
@ -453,7 +453,7 @@ public class MapreduceEntityCleanupActionTest
|
|||
@Test
|
||||
public void testDeleteOfRunningJob_fails() throws Exception {
|
||||
String jobId = createMapreduce("jobname");
|
||||
executeTasks(QUEUE_NAME, clock, Optional.<Integer>of(10));
|
||||
executeTasks(QUEUE_NAME, clock, Optional.of(10));
|
||||
setJobId(jobId);
|
||||
|
||||
action.run();
|
||||
|
@ -469,13 +469,13 @@ public class MapreduceEntityCleanupActionTest
|
|||
@Test
|
||||
public void testDeleteOfRunningJob_succeedsWithForce() throws Exception {
|
||||
String jobId = createMapreduce("jobname");
|
||||
executeTasks(QUEUE_NAME, clock, Optional.<Integer>of(10));
|
||||
executeTasks(QUEUE_NAME, clock, Optional.of(10));
|
||||
clock.setTo(DateTime.now(UTC));
|
||||
action = new MapreduceEntityCleanupAction(
|
||||
Optional.of(jobId),
|
||||
Optional.<String>empty(), // jobName
|
||||
Optional.<Integer>empty(), // numJobsToDelete
|
||||
Optional.<Integer>empty(), // daysOld
|
||||
Optional.empty(), // jobName
|
||||
Optional.empty(), // numJobsToDelete
|
||||
Optional.empty(), // daysOld
|
||||
Optional.of(true), // force
|
||||
mapreduceEntityCleanupUtil,
|
||||
clock,
|
||||
|
@ -497,7 +497,7 @@ public class MapreduceEntityCleanupActionTest
|
|||
@Test
|
||||
public void testJobIdAndJobName_fails() throws Exception {
|
||||
setJobIdJobNameAndDaysOld(
|
||||
Optional.of("jobid"), Optional.of("jobname"), Optional.<Integer>empty());
|
||||
Optional.of("jobid"), Optional.of("jobname"), Optional.empty());
|
||||
|
||||
action.run();
|
||||
|
||||
|
@ -509,7 +509,7 @@ public class MapreduceEntityCleanupActionTest
|
|||
|
||||
@Test
|
||||
public void testJobIdAndDaysOld_fails() throws Exception {
|
||||
setJobIdJobNameAndDaysOld(Optional.of("jobid"), Optional.<String>empty(), Optional.of(0));
|
||||
setJobIdJobNameAndDaysOld(Optional.of("jobid"), Optional.empty(), Optional.of(0));
|
||||
|
||||
action.run();
|
||||
|
||||
|
@ -524,10 +524,10 @@ public class MapreduceEntityCleanupActionTest
|
|||
public void testJobIdAndNumJobs_fails() throws Exception {
|
||||
action = new MapreduceEntityCleanupAction(
|
||||
Optional.of("jobid"),
|
||||
Optional.<String>empty(), // jobName
|
||||
Optional.empty(), // jobName
|
||||
Optional.of(1), // numJobsToDelete
|
||||
Optional.<Integer>empty(), // daysOld
|
||||
Optional.<Boolean>empty(), // force
|
||||
Optional.empty(), // daysOld
|
||||
Optional.empty(), // force
|
||||
mapreduceEntityCleanupUtil,
|
||||
clock,
|
||||
DatastoreServiceFactory.getDatastoreService(),
|
||||
|
@ -545,11 +545,11 @@ public class MapreduceEntityCleanupActionTest
|
|||
@Test
|
||||
public void testDeleteZeroJobs_throwsUsageError() throws Exception {
|
||||
new MapreduceEntityCleanupAction(
|
||||
Optional.<String>empty(), // jobId
|
||||
Optional.<String>empty(), // jobName
|
||||
Optional.<Integer>of(0), // numJobsToDelete
|
||||
Optional.<Integer>empty(), // daysOld
|
||||
Optional.<Boolean>empty(), // force
|
||||
Optional.empty(), // jobId
|
||||
Optional.empty(), // jobName
|
||||
Optional.of(0), // numJobsToDelete
|
||||
Optional.empty(), // daysOld
|
||||
Optional.empty(), // force
|
||||
mapreduceEntityCleanupUtil,
|
||||
clock,
|
||||
DatastoreServiceFactory.getDatastoreService(),
|
||||
|
|
|
@ -86,7 +86,7 @@ public class TldFanoutActionTest {
|
|||
action.queue = getLast(params.get("queue"));
|
||||
action.excludes = params.containsKey("exclude")
|
||||
? ImmutableSet.copyOf(Splitter.on(',').split(params.get("exclude").get(0)))
|
||||
: ImmutableSet.<String>of();
|
||||
: ImmutableSet.of();
|
||||
action.taskEnqueuer = new TaskEnqueuer(new Retrier(null, 1));
|
||||
action.response = response;
|
||||
action.runInEmpty = params.containsKey("runInEmpty");
|
||||
|
|
|
@ -84,8 +84,8 @@ public class PublishDnsUpdatesActionTest {
|
|||
PublishDnsUpdatesAction action = new PublishDnsUpdatesAction();
|
||||
action.timeout = Duration.standardSeconds(10);
|
||||
action.tld = tld;
|
||||
action.hosts = ImmutableSet.<String>of();
|
||||
action.domains = ImmutableSet.<String>of();
|
||||
action.hosts = ImmutableSet.of();
|
||||
action.domains = ImmutableSet.of();
|
||||
action.dnsWriter = "mock";
|
||||
action.dnsWriterProxy = new DnsWriterProxy(ImmutableMap.of("mock", dnsWriter));
|
||||
action.dnsMetrics = dnsMetrics;
|
||||
|
|
|
@ -32,7 +32,6 @@ import com.google.api.services.dns.model.Change;
|
|||
import com.google.api.services.dns.model.ResourceRecordSet;
|
||||
import com.google.api.services.dns.model.ResourceRecordSetsListResponse;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.collect.Sets;
|
||||
import com.google.common.net.InetAddresses;
|
||||
|
@ -305,12 +304,12 @@ public class CloudDnsWriterTest {
|
|||
public void testLoadDomain_nonExistentDomain() throws Exception {
|
||||
writer.publishDomain("example.tld");
|
||||
|
||||
verifyZone(ImmutableSet.<ResourceRecordSet>of());
|
||||
verifyZone(ImmutableSet.of());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLoadDomain_noDsDataOrNameservers() throws Exception {
|
||||
persistResource(fakeDomain("example.tld", ImmutableSet.<HostResource>of(), 0));
|
||||
persistResource(fakeDomain("example.tld", ImmutableSet.of(), 0));
|
||||
writer.publishDomain("example.tld");
|
||||
|
||||
verifyZone(fakeDomainRecords("example.tld", 0, 0, 0, 0));
|
||||
|
@ -319,7 +318,7 @@ public class CloudDnsWriterTest {
|
|||
@Test
|
||||
public void testLoadDomain_deleteOldData() throws Exception {
|
||||
stubZone = fakeDomainRecords("example.tld", 2, 2, 2, 2);
|
||||
persistResource(fakeDomain("example.tld", ImmutableSet.<HostResource>of(), 0));
|
||||
persistResource(fakeDomain("example.tld", ImmutableSet.of(), 0));
|
||||
writer.publishDomain("example.tld");
|
||||
|
||||
verifyZone(fakeDomainRecords("example.tld", 0, 0, 0, 0));
|
||||
|
@ -378,7 +377,7 @@ public class CloudDnsWriterTest {
|
|||
writer.publishHost("ns1.example.com");
|
||||
|
||||
// external hosts should not be published in our zone
|
||||
verifyZone(ImmutableSet.<ResourceRecordSet>of());
|
||||
verifyZone(ImmutableSet.of());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -409,7 +408,7 @@ public class CloudDnsWriterTest {
|
|||
CloudDnsWriter spyWriter = spy(writer);
|
||||
when(mutateZoneCallable.call()).thenThrow(ZoneStateException.class).thenReturn(null);
|
||||
when(spyWriter.getMutateZoneCallback(
|
||||
Matchers.<ImmutableMap<String, ImmutableSet<ResourceRecordSet>>>any()))
|
||||
Matchers.any()))
|
||||
.thenReturn(mutateZoneCallable);
|
||||
spyWriter.commit();
|
||||
|
||||
|
@ -428,7 +427,7 @@ public class CloudDnsWriterTest {
|
|||
.build());
|
||||
writer.publishDomain("example.tld");
|
||||
|
||||
verifyZone(ImmutableSet.<ResourceRecordSet>of());
|
||||
verifyZone(ImmutableSet.of());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -444,7 +443,7 @@ public class CloudDnsWriterTest {
|
|||
|
||||
writer.publishDomain("example.tld");
|
||||
|
||||
verifyZone(ImmutableSet.<ResourceRecordSet>of());
|
||||
verifyZone(ImmutableSet.of());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -459,7 +458,7 @@ public class CloudDnsWriterTest {
|
|||
.build());
|
||||
writer.publishDomain("example.tld");
|
||||
|
||||
verifyZone(ImmutableSet.<ResourceRecordSet>of());
|
||||
verifyZone(ImmutableSet.of());
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -18,7 +18,6 @@ import static com.google.common.collect.Iterables.getLast;
|
|||
import static com.google.common.io.BaseEncoding.base16;
|
||||
import static com.google.common.truth.Truth.assertThat;
|
||||
import static com.google.common.truth.Truth.assert_;
|
||||
import static com.google.common.truth.Truth8.assertThat;
|
||||
import static google.registry.model.index.DomainApplicationIndex.loadActiveApplicationsByDomainName;
|
||||
import static google.registry.model.ofy.ObjectifyService.ofy;
|
||||
import static google.registry.testing.DatastoreHelper.assertNoBillingEvents;
|
||||
|
@ -1092,10 +1091,7 @@ public class DomainApplicationCreateFlowTest
|
|||
@Test
|
||||
public void testFailure_notAuthorizedForTld() throws Exception {
|
||||
persistResource(
|
||||
loadRegistrar("TheRegistrar")
|
||||
.asBuilder()
|
||||
.setAllowedTlds(ImmutableSet.<String>of())
|
||||
.build());
|
||||
loadRegistrar("TheRegistrar").asBuilder().setAllowedTlds(ImmutableSet.of()).build());
|
||||
persistContactsAndHosts();
|
||||
thrown.expect(NotAuthorizedForTldException.class);
|
||||
runFlow();
|
||||
|
@ -1148,10 +1144,7 @@ public class DomainApplicationCreateFlowTest
|
|||
@Test
|
||||
public void testSuccess_superuserNotAuthorizedForTld() throws Exception {
|
||||
persistResource(
|
||||
loadRegistrar("TheRegistrar")
|
||||
.asBuilder()
|
||||
.setAllowedTlds(ImmutableSet.<String>of())
|
||||
.build());
|
||||
loadRegistrar("TheRegistrar").asBuilder().setAllowedTlds(ImmutableSet.of()).build());
|
||||
persistContactsAndHosts();
|
||||
clock.advanceOneMilli();
|
||||
runSuperuserFlow("domain_create_sunrise_encoded_signed_mark_response.xml");
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue