mirror of
https://github.com/google/nomulus
synced 2026-05-18 13:51:45 +00:00
Migrate Domain, Registrar, and Token models to java.time (#3022)
Migrated core EppResource and Token models from Joda-Time DateTime to java.time.Instant. Specific migrations include: - `DomainBase` and `Domain`: Migrated `registrationExpirationTime` and various other timestamps to use `Instant` directly. - `Registrar`: Migrated `lastPocVerificationDate` and certificate dates to `Instant`. - `BulkPricingPackage`: Migrated `nextBillingDate` and `lastNotificationSent`. - `AllocationToken`: Migrated `tokenStatusTransitions` map keys to `Instant`. - `LaunchNotice`: Migrated `acceptedTime` and `expirationTime`. Updated all associated EPP flows (e.g., DomainCreateFlow, DomainRenewFlow), batch actions (e.g., CheckBulkComplianceAction, DeleteExpiredDomainsAction), command-line tools (e.g., UnrenewDomainCommand, UpdateBulkPricingPackageCommand), and tests to handle `Instant` directly.
This commit is contained in:
@@ -170,7 +170,7 @@ public abstract class DateTimeUtils {
|
||||
* Adds years to a date, in the {@code Duration} sense of semantic years. Use this instead of
|
||||
* {@link java.time.ZonedDateTime#plusYears} to ensure that we never end up on February 29.
|
||||
*/
|
||||
public static Instant plusYears(Instant now, long years) {
|
||||
public static Instant plusYears(Instant now, int years) {
|
||||
checkArgument(years >= 0);
|
||||
return (years == 0)
|
||||
? now
|
||||
|
||||
Reference in New Issue
Block a user