mirror of
https://github.com/google/nomulus
synced 2026-08-16 04:06:09 +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:
@@ -60,7 +60,6 @@ dependencies {
|
||||
implementation deps['io.netty:netty-handler']
|
||||
implementation deps['io.netty:netty-transport']
|
||||
implementation deps['jakarta.inject:jakarta.inject-api']
|
||||
implementation deps['joda-time:joda-time']
|
||||
implementation deps['org.bouncycastle:bcpkix-jdk18on']
|
||||
implementation deps['org.bouncycastle:bcprov-jdk18on']
|
||||
implementation project(':common')
|
||||
|
||||
@@ -144,7 +144,6 @@ jakarta.mail:jakarta.mail-api:2.2.0-M1=deploy_jar,runtimeClasspath,testRuntimeCl
|
||||
jakarta.xml.bind:jakarta.xml.bind-api:4.1.0-M1=deploy_jar,runtimeClasspath,testRuntimeClasspath
|
||||
javax.annotation:javax.annotation-api:1.3.2=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
javax.inject:javax.inject:1=annotationProcessor,compileClasspath,deploy_jar,runtimeClasspath,testAnnotationProcessor,testCompileClasspath,testRuntimeClasspath
|
||||
joda-time:joda-time:2.14.2=compileClasspath,deploy_jar,runtimeClasspath,testCompileClasspath,testRuntimeClasspath
|
||||
junit:junit:4.13.2=testCompileClasspath,testRuntimeClasspath
|
||||
net.bytebuddy:byte-buddy-agent:1.17.7=testCompileClasspath,testRuntimeClasspath
|
||||
net.bytebuddy:byte-buddy:1.17.7=testCompileClasspath,testRuntimeClasspath
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
|
||||
package google.registry.proxy;
|
||||
|
||||
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
import static google.registry.proxy.ProxyConfig.getProxyConfig;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user