mirror of
https://github.com/google/nomulus
synced 2026-07-27 18:42:43 +00:00
Complete Joda-Time to java.time migration (#3039)
This completes the exhaustive refactoring of foundational temporal types from Joda-Time to the native java.time API across the entire codebase. - Replaced org.joda.time.DateTime, Instant, LocalDate, and Duration with java.time equivalents. - Audited and updated Clock implementations (FakeClock, SystemClock). Added nowMillis(), nowDate(), and nowDateTime() to eliminate repetitive conversions and maintain parallel naming. - Replaced ZonedDateTime with OffsetDateTime globally per go/avoid-zdt. OffsetDateTime is a better fit as we use a hardcoded ZoneOffset.UTC throughout the system, making geographical time zone rules (like daylight saving time) irrelevant and preventing serialization ambiguities. Added a presubmit check. - Completely removed all transitional bridge methods from DateTimeUtils and deleted obsolete converters (e.g., DateTimeConverter). - Updated testing infrastructure, Apache Beam pipelines, custom JCommander parameters, and networking modules to solely rely on java.time primitives. - Retained the lone necessary org.joda.time.Instant usage in SafeBrowsingTransforms required by the Apache Beam API. - Cleared Gradle lockfiles and removed the joda-time dependency entirely from the build configuration.
This commit is contained in:
@@ -15,4 +15,3 @@
|
||||
CREATE INDEX IDXy98mebut8ix1v07fjxxdkqcx ON "Host" (creation_time);
|
||||
CREATE INDEX IDXovmntef6l45tw2bsfl56tcugx ON "Host" (deletion_time);
|
||||
CREATE INDEX IDXl49vydnq0h5j1piefwjy4i8er ON "Host" (current_sponsor_registrar_id);
|
||||
|
||||
|
||||
-1
@@ -16,4 +16,3 @@ ALTER TABLE "BillingCancellation" DROP COLUMN billing_event_domain_repo_id;
|
||||
ALTER TABLE "BillingCancellation" DROP COLUMN billing_event_history_id;
|
||||
ALTER TABLE "BillingCancellation" DROP COLUMN billing_recurrence_domain_repo_id;
|
||||
ALTER TABLE "BillingCancellation" DROP COLUMN billing_recurrence_history_id;
|
||||
|
||||
|
||||
@@ -25,4 +25,3 @@
|
||||
);
|
||||
|
||||
create index IDXlg6a5tp70nch9cp0gc11brc5o on "PackagePromotion" (token);
|
||||
|
||||
|
||||
@@ -18,4 +18,3 @@ CREATE SEQUENCE public."project_wide_unique_id_seq"
|
||||
MINVALUE 59880480005
|
||||
NO MAXVALUE
|
||||
CACHE 10;
|
||||
|
||||
|
||||
@@ -14,4 +14,3 @@
|
||||
|
||||
alter table "RegistrarPoc" add column login_email_address text;
|
||||
create index registrarpoc_login_email_idx on "RegistrarPoc" (login_email_address);
|
||||
|
||||
|
||||
@@ -13,4 +13,3 @@
|
||||
-- limitations under the License.
|
||||
|
||||
ALTER TABLE "RegistrarPoc" DROP COLUMN gae_user_id;
|
||||
|
||||
|
||||
-3
@@ -15,6 +15,3 @@
|
||||
ALTER TABLE "DnsRefreshRequest" RENAME COLUMN process_time TO last_process_time;
|
||||
CREATE INDEX IDXfdk2xpil2x1gh0omt84k2y3o1 ON "DnsRefreshRequest" (last_process_time);
|
||||
DROP INDEX IDX3i7i2ktts9d7lcjbs34h0pvwo;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -13,4 +13,3 @@
|
||||
-- limitations under the License.
|
||||
|
||||
ALTER TABLE "Lock" DROP COLUMN request_log_id;
|
||||
|
||||
|
||||
@@ -13,4 +13,3 @@
|
||||
-- limitations under the License.
|
||||
|
||||
ALTER TABLE "User" DROP COLUMN gaia_id;
|
||||
|
||||
|
||||
@@ -19,4 +19,3 @@ ALTER TABLE "DomainHost"
|
||||
ADD CONSTRAINT FK_DomainHost_host_valid
|
||||
FOREIGN KEY (ns_hosts)
|
||||
REFERENCES "HostResource";
|
||||
|
||||
|
||||
@@ -15,4 +15,3 @@
|
||||
ALTER TABLE "RegistryLock" DROP COLUMN relock_duration;
|
||||
|
||||
ALTER TABLE "RegistryLock" ADD COLUMN relock_duration interval;
|
||||
|
||||
|
||||
@@ -24,4 +24,3 @@ ALTER TABLE if exists "Domain"
|
||||
FOREIGN KEY (transfer_billing_event_id)
|
||||
REFERENCES "BillingEvent"
|
||||
DEFERRABLE INITIALLY DEFERRED;
|
||||
|
||||
|
||||
@@ -22,4 +22,3 @@ ALTER TABLE "HostHistory" ADD CONSTRAINT fk_hosthistory_host
|
||||
FOREIGN KEY (host_repo_id)
|
||||
REFERENCES "Host"(repo_id)
|
||||
DEFERRABLE INITIALLY DEFERRED;
|
||||
|
||||
|
||||
@@ -19,4 +19,3 @@ create index IDXq9gy8x2xynt9tb16yajn1gcm8 on "Domain" (billing_contact);
|
||||
create index IDXr22ciyccwi9rrqmt1ro0s59qf on "Domain" (tech_contact);
|
||||
|
||||
create index IDXa7fu0bqynfb79rr80528b4jqt on "Domain" (registrant_contact);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user