Upgrade to Java 25 (#3000)

Error-prone introduced many more checks in Java 25. We fixed a few
and suppressed most. A follow-up bug is opened to clean this up.
An ai agent should be able to clean up most of it.

This PR is created with gemini-cli. Summary of experience:

* The good: AI caught most compatibility issues, and with permission,
  suppressed them through compiler flags and errorprone options.
  It also caught many versio references in scripts.

* Where it didn't shine:
  - It did not find and update the target version spec in the custome
    VKey annotation processor source file.
  - It did not flag eclipse-temurin:21 docker image for upgrade.
  - When running into failure, its first instinct is to disable checks
    e.g., -Werror instead of fixing them.
This commit is contained in:
Weimin Yu
2026-04-02 21:23:00 +00:00
committed by GitHub
parent 9f3dfec118
commit d2881b47dc
25 changed files with 253 additions and 258 deletions
+24 -29
View File
@@ -1,7 +1,7 @@
# This is a Gradle generated file for dependency locking.
# Manual edits can break the build and are not advised.
# This file is expected to be part of source control.
aopalliance:aopalliance:1.0=annotationProcessor,deploy_jar,runtimeClasspath,testAnnotationProcessor,testRuntimeClasspath
aopalliance:aopalliance:1.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
args4j:args4j:2.33=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.charleskorn.kaml:kaml:0.20.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.fasterxml.jackson.core:jackson-annotations:2.21=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -93,7 +93,7 @@ com.google.auto.service:auto-service-annotations:1.1.1=deploy_jar,runtimeClasspa
com.google.auto.value:auto-value-annotations:1.11.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.auto.value:auto-value-annotations:1.9=annotationProcessor,testAnnotationProcessor
com.google.auto.value:auto-value:1.11.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.auto:auto-common:1.2.1=annotationProcessor,testAnnotationProcessor
com.google.auto:auto-common:1.2.2=annotationProcessor,testAnnotationProcessor
com.google.cloud.bigdataoss:gcsio:2.2.16=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud.bigdataoss:util:2.2.16=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud.bigtable:bigtable-client-core-config:1.28.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -120,29 +120,25 @@ com.google.cloud:google-cloud-tasks:2.51.0=deploy_jar,runtimeClasspath,testRunti
com.google.cloud:grpc-gcp:1.6.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:libraries-bom:26.48.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.cloud:proto-google-cloud-firestore-bundle-v1:3.26.5=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.code.findbugs:jsr305:3.0.2=annotationProcessor,checkstyle,deploy_jar,runtimeClasspath,testAnnotationProcessor,testRuntimeClasspath
com.google.code.findbugs:jsr305:3.0.2=checkstyle,deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.code.gson:gson:2.12.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.common.html.types:types:1.0.8=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.dagger:dagger:2.59.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.errorprone:error_prone_annotation:2.23.0=annotationProcessor,testAnnotationProcessor
com.google.errorprone:error_prone_annotations:2.23.0=annotationProcessor,testAnnotationProcessor
com.google.errorprone:error_prone_annotation:2.48.0=annotationProcessor,testAnnotationProcessor
com.google.errorprone:error_prone_annotations:2.36.0=checkstyle
com.google.errorprone:error_prone_annotations:2.48.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.errorprone:error_prone_check_api:2.23.0=annotationProcessor,testAnnotationProcessor
com.google.errorprone:error_prone_core:2.23.0=annotationProcessor,testAnnotationProcessor
com.google.errorprone:error_prone_type_annotations:2.23.0=annotationProcessor,testAnnotationProcessor
com.google.errorprone:error_prone_annotations:2.48.0=annotationProcessor,deploy_jar,runtimeClasspath,testAnnotationProcessor,testRuntimeClasspath
com.google.errorprone:error_prone_check_api:2.48.0=annotationProcessor,testAnnotationProcessor
com.google.errorprone:error_prone_core:2.48.0=annotationProcessor,testAnnotationProcessor
com.google.escapevelocity:escapevelocity:1.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.flatbuffers:flatbuffers-java:23.5.26=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.flogger:flogger-system-backend:0.8=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.flogger:flogger:0.8=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.flogger:google-extensions:0.8=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.guava:failureaccess:1.0.1=annotationProcessor,testAnnotationProcessor
com.google.guava:failureaccess:1.0.3=checkstyle,deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.guava:guava-parent:32.1.1-jre=annotationProcessor,testAnnotationProcessor
com.google.guava:guava:32.1.1-jre=annotationProcessor,testAnnotationProcessor
com.google.googlejavaformat:google-java-format:1.34.1=annotationProcessor,testAnnotationProcessor
com.google.guava:failureaccess:1.0.3=annotationProcessor,checkstyle,deploy_jar,runtimeClasspath,testAnnotationProcessor,testRuntimeClasspath
com.google.guava:guava:33.4.8-jre=checkstyle
com.google.guava:guava:33.5.0-jre=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=checkstyle,deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.guava:guava:33.5.0-jre=annotationProcessor,deploy_jar,runtimeClasspath,testAnnotationProcessor,testRuntimeClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=annotationProcessor,checkstyle,deploy_jar,runtimeClasspath,testAnnotationProcessor,testRuntimeClasspath
com.google.gwt:gwt-user:2.10.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-apache-v2:2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-appengine:1.46.3=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -150,10 +146,9 @@ com.google.http-client:google-http-client-gson:2.1.0=deploy_jar,runtimeClasspath
com.google.http-client:google-http-client-jackson2:1.46.3=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.http-client:google-http-client-protobuf:1.45.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.http-client:google-http-client:2.1.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.inject:guice:5.1.0=annotationProcessor,testAnnotationProcessor
com.google.inject:guice:7.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.j2objc:j2objc-annotations:3.0.0=checkstyle
com.google.j2objc:j2objc-annotations:3.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.j2objc:j2objc-annotations:3.1=annotationProcessor,deploy_jar,runtimeClasspath,testAnnotationProcessor,testRuntimeClasspath
com.google.jsinterop:jsinterop-annotations:2.0.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.monitoring-client:metrics:1.0.7=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.monitoring-client:stackdriver:1.0.7=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -162,7 +157,7 @@ com.google.oauth-client:google-oauth-client-jetty:1.36.0=deploy_jar,runtimeClass
com.google.oauth-client:google-oauth-client-servlet:1.36.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.oauth-client:google-oauth-client:1.39.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.protobuf:protobuf-java-util:4.33.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.protobuf:protobuf-java:3.19.6=annotationProcessor,testAnnotationProcessor
com.google.protobuf:protobuf-java:4.33.2=annotationProcessor,testAnnotationProcessor
com.google.protobuf:protobuf-java:4.34.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.re2j:re2j:1.7=deploy_jar,runtimeClasspath,testRuntimeClasspath
com.google.template:soy:2024-02-26=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -203,7 +198,7 @@ dnsjava:dnsjava:3.6.4=deploy_jar,runtimeClasspath,testRuntimeClasspath
info.picocli:picocli:4.7.7=checkstyle
io.apicurio:apicurio-registry-protobuf-schema-utilities:3.0.0.M2=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.github.classgraph:classgraph:4.8.162=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.github.eisop:dataflow-errorprone:3.34.0-eisop1=annotationProcessor,testAnnotationProcessor
io.github.eisop:dataflow-errorprone:3.41.0-eisop1=annotationProcessor,testAnnotationProcessor
io.github.java-diff-utils:java-diff-utils:4.12=annotationProcessor,testAnnotationProcessor
io.github.java-diff-utils:java-diff-utils:4.16=deploy_jar,runtimeClasspath,testRuntimeClasspath
io.grpc:grpc-alts:1.70.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -333,7 +328,7 @@ org.bouncycastle:bcpkix-jdk18on:1.83=deploy_jar,runtimeClasspath,testRuntimeClas
org.bouncycastle:bcprov-jdk18on:1.83=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.bouncycastle:bcutil-jdk18on:1.83=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.checkerframework:checker-compat-qual:2.5.6=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.checkerframework:checker-qual:3.33.0=annotationProcessor,testAnnotationProcessor
org.checkerframework:checker-qual:3.19.0=annotationProcessor,testAnnotationProcessor
org.checkerframework:checker-qual:3.49.3=checkstyle
org.checkerframework:checker-qual:3.52.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.codehaus.mojo:animal-sniffer-annotations:1.24=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -346,8 +341,8 @@ org.eclipse.angus:angus-activation:2.1.0-M1=deploy_jar,runtimeClasspath,testRunt
org.eclipse.angus:jakarta.mail:2.1.0-M1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.eclipse.collections:eclipse-collections-api:11.1.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.eclipse.collections:eclipse-collections:11.1.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.flywaydb:flyway-core:12.2.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.flywaydb:flyway-database-postgresql:12.2.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.flywaydb:flyway-core:12.3.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.flywaydb:flyway-database-postgresql:12.3.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.glassfish.jaxb:jaxb-core:4.0.6=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.glassfish.jaxb:jaxb-runtime:4.0.6=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.glassfish.jaxb:txw2:4.0.6=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -382,7 +377,7 @@ org.jline:jline:3.30.5=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.joda:joda-money:2.0.3=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.json:json:20240303=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.jsoup:jsoup:1.22.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.jspecify:jspecify:1.0.0=checkstyle,deploy_jar,runtimeClasspath,testRuntimeClasspath
org.jspecify:jspecify:1.0.0=annotationProcessor,checkstyle,deploy_jar,runtimeClasspath,testAnnotationProcessor,testRuntimeClasspath
org.ogce:xpp3:1.1.6=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.ow2.asm:asm-analysis:9.7.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.ow2.asm:asm-commons:9.7.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -392,7 +387,7 @@ org.ow2.asm:asm-tree:9.9=jacocoAnt
org.ow2.asm:asm-util:9.7.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.ow2.asm:asm:9.8=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.ow2.asm:asm:9.9=jacocoAnt
org.pcollections:pcollections:3.1.4=annotationProcessor,testAnnotationProcessor
org.pcollections:pcollections:4.0.1=annotationProcessor,testAnnotationProcessor
org.postgresql:postgresql:42.7.10=deploy_jar,runtimeClasspath,testRuntimeClasspath
org.reflections:reflections:0.10.2=checkstyle
org.rnorth.duct-tape:duct-tape:1.0.8=deploy_jar,runtimeClasspath,testRuntimeClasspath
@@ -412,12 +407,12 @@ tools.jackson.core:jackson-core:3.1.0=deploy_jar,runtimeClasspath,testRuntimeCla
tools.jackson.core:jackson-databind:3.1.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
tools.jackson:jackson-bom:3.1.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
us.fatehi:schemacrawler-api:17.1.7=deploy_jar,runtimeClasspath,testRuntimeClasspath
us.fatehi:schemacrawler-diagram:17.8.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
us.fatehi:schemacrawler-operations:17.8.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
us.fatehi:schemacrawler-postgresql:17.8.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
us.fatehi:schemacrawler-text:17.8.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
us.fatehi:schemacrawler-diagram:17.9.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
us.fatehi:schemacrawler-operations:17.9.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
us.fatehi:schemacrawler-postgresql:17.9.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
us.fatehi:schemacrawler-text:17.9.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
us.fatehi:schemacrawler-tools:17.1.7=deploy_jar,runtimeClasspath,testRuntimeClasspath
us.fatehi:schemacrawler-utility:17.1.7=deploy_jar,runtimeClasspath,testRuntimeClasspath
us.fatehi:schemacrawler:17.8.1=deploy_jar,runtimeClasspath,testRuntimeClasspath
us.fatehi:schemacrawler:17.9.0=deploy_jar,runtimeClasspath,testRuntimeClasspath
xerces:xmlParserAPIs:2.6.2=deploy_jar,runtimeClasspath,testRuntimeClasspath
empty=compileClasspath,providedCompile,providedRuntime,shadow,testCompileClasspath