Skip to content

Migrate core entities and billing to java.time#3020

Open
CydeWeys wants to merge 1 commit intogoogle:masterfrom
CydeWeys:javatime-refactor-5th
Open

Migrate core entities and billing to java.time#3020
CydeWeys wants to merge 1 commit intogoogle:masterfrom
CydeWeys:javatime-refactor-5th

Conversation

@CydeWeys
Copy link
Copy Markdown
Member

@CydeWeys CydeWeys commented Apr 22, 2026

Migrated core entity primitives (GracePeriod, RegistryLock, TimeOfYear), transfer objects (BaseTransferObject, DomainTransferData, TransferResponse) and HostBase from Joda-Time DateTime to java.time.Instant. Migrated the Billing Ecosystem (BillingBase, BillingEvent, BillingRecurrence, BillingCancellation) and associated Beam pipelines (ExpandBillingRecurrencesPipeline, InvoicingPipeline) to java.time.Instant. Updated all associated EPP flows, tools, and testing helpers to handle Instants directly where supported.


This change is Reviewable

Comment thread core/src/main/java/google/registry/flows/host/HostInfoFlow.java Fixed
Optional.ofNullable(getLastSuperordinateChange()).orElse(getCreationTimeInstant());
Instant lastTransferOfCurrentSuperordinate =
Optional.ofNullable(superordinateDomain.getLastTransferTimeInstant()).orElse(START_INSTANT);
Optional.ofNullable(superordinateDomain.getLastTransferTime())
RegistryLockDao.getLocksByRegistrarId(registrarId).stream()
.filter(lock -> !lock.isLockRequestExpired(tm().getTransactionTime()))
.filter(
lock -> !lock.isLockRequestExpired(toInstant(tm().getTransactionTime())))
.setTargetId(existingDomain.getDomainName())
.setRegistrarId("TheRegistrar")
.setEventTime(existingDomain.getCreationTime())
.setEventTime(toInstant(existingDomain.getCreationTime()))
.setRegistrarId("TheRegistrar")
.setEventTime(domain.getRegistrationExpirationDateTime())
.setRecurrenceEndTime(END_OF_TIME)
.setEventTime(toInstant(domain.getRegistrationExpirationDateTime()))
.hasPersistedCurrentSponsorRegistrarId("TheRegistrar")
.and()
.hasLastTransferTime(domain.getLastTransferTime());
.hasLastTransferTime(toInstant(domain.getLastTransferTime()));
BillingCancellation.forGracePeriod(
GracePeriod.forBillingEvent(GracePeriodStatus.ADD, domain.getRepoId(), billingEvent),
domainHistory2.getModificationTime(),
toInstant(domainHistory2.getModificationTime()),
"TheRegistrar",
billingRecurrence.createVKey()),
domainHistory2.getModificationTime(),
toInstant(domainHistory2.getModificationTime()),
toInstant(now.plusDays(1)),
"a registrar"),
domainHistory.getModificationTime(),
toInstant(domainHistory.getModificationTime()),
.setRenewalPriceBehavior(renewalPriceBehavior)
.setRegistrarId(domain.getCreationRegistrarId())
.setEventTime(domain.getCreationTime())
.setEventTime(toInstant(domain.getCreationTime()))
@CydeWeys CydeWeys force-pushed the javatime-refactor-5th branch from 70ce744 to ca32534 Compare April 22, 2026 18:33
Migrated core entity primitives (GracePeriod, RegistryLock, TimeOfYear), transfer objects (BaseTransferObject, DomainTransferData, TransferResponse) and HostBase from Joda-Time DateTime to java.time.Instant as Phases 5 and 7.
Migrated the Billing Ecosystem (BillingBase, BillingEvent, BillingRecurrence, BillingCancellation) and associated Beam pipelines (ExpandBillingRecurrencesPipeline, InvoicingPipeline) to java.time.Instant as Phase 6.
Updated all associated EPP flows, tools, and testing helpers to handle Instants directly where supported.
@CydeWeys CydeWeys force-pushed the javatime-refactor-5th branch from ca32534 to 0752d32 Compare April 22, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants