mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 07:57:13 +02:00
Declare types in ImmutableSet.of() usage
------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=167625611
This commit is contained in:
parent
fa70bd272a
commit
57bcd6b1eb
4 changed files with 9 additions and 7 deletions
|
@ -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.absent()
|
||||
? Optional.<BillingEvent.OneTime>absent()
|
||||
: Optional.of(
|
||||
new BillingEvent.OneTime.Builder()
|
||||
.setReason(Reason.TRANSFER)
|
||||
|
|
|
@ -75,6 +75,7 @@ import google.registry.model.transfer.TransferData.TransferServerApproveEntity;
|
|||
import google.registry.model.transfer.TransferResponse.DomainTransferResponse;
|
||||
import google.registry.model.transfer.TransferStatus;
|
||||
import javax.inject.Inject;
|
||||
import org.joda.money.Money;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
/**
|
||||
|
@ -162,7 +163,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.absent()
|
||||
? Optional.<FeesAndCredits>absent()
|
||||
: Optional.of(pricingLogic.getTransferPrice(registry, targetId, now));
|
||||
if (feesAndCredits.isPresent()) {
|
||||
validateFeeChallenge(targetId, tld, now, feeTransfer, feesAndCredits.get());
|
||||
|
@ -206,7 +207,7 @@ public final class DomainTransferRequestFlow implements TransactionalFlow {
|
|||
gainingClientId,
|
||||
(feesAndCredits.isPresent())
|
||||
? Optional.of(feesAndCredits.get().getTotalCost())
|
||||
: Optional.absent(),
|
||||
: Optional.<Money>absent(),
|
||||
now);
|
||||
// Create the transfer data that represents the pending transfer.
|
||||
TransferData pendingTransferData =
|
||||
|
|
|
@ -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.of());
|
||||
builder.setGracePeriods(ImmutableSet.<GracePeriod>of());
|
||||
}
|
||||
// Set all remaining transfer properties.
|
||||
setAutomaticTransferSuccessProperties(builder, transferData);
|
||||
|
|
|
@ -183,7 +183,7 @@ public class DomainTransferRequestFlowTest
|
|||
final HistoryEntry historyEntryTransferRequest =
|
||||
getOnlyHistoryEntryOfType(domain, DOMAIN_TRANSFER_REQUEST);
|
||||
subordinateHost = reloadResourceAndCloneAtTime(subordinateHost, clock.nowUtc());
|
||||
assertTransferRequested(domain, Optional.absent());
|
||||
assertTransferRequested(domain, Optional.<Duration>absent());
|
||||
assertAboutDomains().that(domain)
|
||||
.hasPendingTransferExpirationTime(implicitTransferTime).and()
|
||||
.hasOneHistoryEntryEachOfTypes(DOMAIN_CREATE, DOMAIN_TRANSFER_REQUEST);
|
||||
|
@ -201,10 +201,11 @@ public class DomainTransferRequestFlowTest
|
|||
originalGracePeriods,
|
||||
extraExpectedBillingEvents);
|
||||
|
||||
assertPollMessagesEmitted(expectedExpirationTime, implicitTransferTime, Optional.absent());
|
||||
assertPollMessagesEmitted(
|
||||
expectedExpirationTime, implicitTransferTime, Optional.<Duration>absent());
|
||||
|
||||
assertAboutDomainAfterAutomaticTransfer(
|
||||
expectedExpirationTime, implicitTransferTime, Optional.absent());
|
||||
expectedExpirationTime, implicitTransferTime, Optional.<Duration>absent());
|
||||
}
|
||||
|
||||
private void assertHistoryEntriesContainBillingEventsAndGracePeriods(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue