Move testing of JDK-22 to JDK-23

This is removing support for JDK-22 and is moving all testing on
JDK-22 to JDK-23.

Bug: b/383073689
Change-Id: I9d87958c9c4b845fc5915acf9bbba25669fce0b6
diff --git a/d8_r8/commonBuildSrc/src/main/kotlin/DependenciesPlugin.kt b/d8_r8/commonBuildSrc/src/main/kotlin/DependenciesPlugin.kt
index bd2e698..13d9c8d 100644
--- a/d8_r8/commonBuildSrc/src/main/kotlin/DependenciesPlugin.kt
+++ b/d8_r8/commonBuildSrc/src/main/kotlin/DependenciesPlugin.kt
@@ -56,7 +56,6 @@
   JDK_11("jdk-11", 11),
   JDK_17("jdk-17", 17),
   JDK_21("jdk-21", 21),
-  JDK_22("jdk-22", 22),  // TODO(b/383073689) Remove JDK-22 when bots test JDK-23.
   JDK_23("jdk-23", 23);
 
   fun isJdk8() : Boolean {
diff --git a/infra/config/global/generated/cr-buildbucket.cfg b/infra/config/global/generated/cr-buildbucket.cfg
index ded5fe1..89c578f 100644
--- a/infra/config/global/generated/cr-buildbucket.cfg
+++ b/infra/config/global/generated/cr-buildbucket.cfg
@@ -1551,7 +1551,7 @@
       }
     }
     builders {
-      name: "linux-jdk22"
+      name: "linux-jdk23"
       swarming_host: "chrome-swarming.appspot.com"
       swarming_tags: "vpython:native-python-wrapper"
       dimensions: "cpu:x86-64"
@@ -1568,7 +1568,7 @@
         '  "builder_group": "internal.client.r8",'
         '  "recipe": "rex",'
         '  "test_options": ['
-        '    "--runtimes=jdk22",'
+        '    "--runtimes=jdk23",'
         '    "--command_cache_dir=/tmp/ccache",'
         '    "--tool=r8",'
         '    "--print-times",'
@@ -1588,7 +1588,7 @@
       }
     }
     builders {
-      name: "linux-jdk22_release"
+      name: "linux-jdk23_release"
       swarming_host: "chrome-swarming.appspot.com"
       swarming_tags: "vpython:native-python-wrapper"
       dimensions: "cpu:x86-64"
@@ -1605,7 +1605,7 @@
         '  "builder_group": "internal.client.r8",'
         '  "recipe": "rex",'
         '  "test_options": ['
-        '    "--runtimes=jdk22",'
+        '    "--runtimes=jdk23",'
         '    "--command_cache_dir=/tmp/ccache",'
         '    "--tool=r8",'
         '    "--print-times",'
diff --git a/infra/config/global/generated/luci-milo.cfg b/infra/config/global/generated/luci-milo.cfg
index f5ccab5..b358418 100644
--- a/infra/config/global/generated/luci-milo.cfg
+++ b/infra/config/global/generated/luci-milo.cfg
@@ -51,9 +51,9 @@
     short_name: "jdk21"
   }
   builders {
-    name: "buildbucket/luci.r8.ci/linux-jdk22"
+    name: "buildbucket/luci.r8.ci/linux-jdk23"
     category: "R8"
-    short_name: "jdk22"
+    short_name: "jdk23"
   }
   builders {
     name: "buildbucket/luci.r8.ci/linux-android-4.0"
@@ -201,9 +201,9 @@
     short_name: "jdk21"
   }
   builders {
-    name: "buildbucket/luci.r8.ci/linux-jdk22_release"
+    name: "buildbucket/luci.r8.ci/linux-jdk23_release"
     category: "Release|R8"
-    short_name: "jdk22"
+    short_name: "jdk23"
   }
   builders {
     name: "buildbucket/luci.r8.ci/linux-android-4.0_release"
diff --git a/infra/config/global/generated/luci-notify.cfg b/infra/config/global/generated/luci-notify.cfg
index d92096a..53754aa 100644
--- a/infra/config/global/generated/luci-notify.cfg
+++ b/infra/config/global/generated/luci-notify.cfg
@@ -480,7 +480,7 @@
   }
   builders {
     bucket: "ci"
-    name: "linux-jdk22"
+    name: "linux-jdk23"
     repository: "https://r8.googlesource.com/r8"
   }
 }
@@ -492,7 +492,7 @@
   }
   builders {
     bucket: "ci"
-    name: "linux-jdk22_release"
+    name: "linux-jdk23_release"
     repository: "https://r8.googlesource.com/r8"
   }
 }
diff --git a/infra/config/global/generated/luci-scheduler.cfg b/infra/config/global/generated/luci-scheduler.cfg
index 6da876d..604d751 100644
--- a/infra/config/global/generated/luci-scheduler.cfg
+++ b/infra/config/global/generated/luci-scheduler.cfg
@@ -617,7 +617,7 @@
   }
 }
 job {
-  id: "linux-jdk22"
+  id: "linux-jdk23"
   realm: "ci"
   acl_sets: "ci"
   triggering_policy {
@@ -627,11 +627,11 @@
   buildbucket {
     server: "cr-buildbucket.appspot.com"
     bucket: "ci"
-    builder: "linux-jdk22"
+    builder: "linux-jdk23"
   }
 }
 job {
-  id: "linux-jdk22_release"
+  id: "linux-jdk23_release"
   realm: "ci"
   acl_sets: "ci"
   triggering_policy {
@@ -642,7 +642,7 @@
   buildbucket {
     server: "cr-buildbucket.appspot.com"
     bucket: "ci"
-    builder: "linux-jdk22_release"
+    builder: "linux-jdk23_release"
   }
 }
 job {
@@ -832,7 +832,7 @@
   realm: "ci"
   acl_sets: "ci"
   triggers: "linux-android-15_release"
-  triggers: "linux-jdk22_release"
+  triggers: "linux-jdk23_release"
   gitiles {
     repo: "https://r8.googlesource.com/r8"
     refs: "regexp:refs/heads/([8]\\.[5-9]+(\\.[0-9]+)?|[9]\\.[0-9]+(\\.[0-9]+)?)"
@@ -893,7 +893,7 @@
   triggers: "linux-jdk11"
   triggers: "linux-jdk17"
   triggers: "linux-jdk21"
-  triggers: "linux-jdk22"
+  triggers: "linux-jdk23"
   triggers: "linux-jdk8"
   triggers: "linux-none"
   triggers: "linux-old"
diff --git a/infra/config/global/main.star b/infra/config/global/main.star
index 3e642c0..043a2e9 100755
--- a/infra/config/global/main.star
+++ b/infra/config/global/main.star
@@ -350,8 +350,8 @@
 r8_tester_with_default("linux-jdk21",
         ["--runtimes=jdk21", "--command_cache_dir=/tmp/ccache"],
         release_trigger=["branch-gitiles-8.3-forward"])
-r8_tester_with_default("linux-jdk22",
-        ["--runtimes=jdk22", "--command_cache_dir=/tmp/ccache"],
+r8_tester_with_default("linux-jdk23",
+        ["--runtimes=jdk23", "--command_cache_dir=/tmp/ccache"],
         release_trigger=["branch-gitiles-8.5-forward"])
 
 r8_tester_with_default("linux-android-4.0",
diff --git a/src/test/testbase/java/com/android/tools/r8/TestRuntime.java b/src/test/testbase/java/com/android/tools/r8/TestRuntime.java
index 901bfda..f14cec1 100644
--- a/src/test/testbase/java/com/android/tools/r8/TestRuntime.java
+++ b/src/test/testbase/java/com/android/tools/r8/TestRuntime.java
@@ -45,8 +45,6 @@
     JDK20("jdk20", 64),
     // From JDK-21 only include LTS and latest non-LTS.
     JDK21("jdk21", 65),
-    // TODO(b/383073689) Remove JDK-22 when bots test JDK-23.
-    JDK22("jdk22", 66),
     JDK23("jdk23", 67);
 
     /** This should generally be the latest checked in CF runtime we fully support. */
@@ -102,7 +100,6 @@
   private static final Path JDK11_PATH = Paths.get(ToolHelper.THIRD_PARTY_DIR, "openjdk", "jdk-11");
   private static final Path JDK17_PATH = Paths.get(ToolHelper.THIRD_PARTY_DIR, "openjdk", "jdk-17");
   private static final Path JDK21_PATH = Paths.get(ToolHelper.THIRD_PARTY_DIR, "openjdk", "jdk-21");
-  private static final Path JDK22_PATH = Paths.get(ToolHelper.THIRD_PARTY_DIR, "openjdk", "jdk-22");
   private static final Path JDK23_PATH = Paths.get(ToolHelper.THIRD_PARTY_DIR, "openjdk", "jdk-23");
   private static final Map<CfVm, Path> jdkPaths =
       ImmutableMap.of(
@@ -111,7 +108,6 @@
           CfVm.JDK11, JDK11_PATH,
           CfVm.JDK17, JDK17_PATH,
           CfVm.JDK21, JDK21_PATH,
-          CfVm.JDK22, JDK22_PATH,
           CfVm.JDK23, JDK23_PATH);
 
   public static CfRuntime getCheckedInJdk(CfVm vm) {
@@ -165,10 +161,6 @@
     return new CfRuntime(CfVm.JDK21, getCheckedInJdkHome(CfVm.JDK21));
   }
 
-  public static CfRuntime getCheckedInJdk22() {
-    return new CfRuntime(CfVm.JDK22, getCheckedInJdkHome(CfVm.JDK22));
-  }
-
   public static CfRuntime getCheckedInJdk23() {
     return new CfRuntime(CfVm.JDK23, getCheckedInJdkHome(CfVm.JDK23));
   }
@@ -181,7 +173,6 @@
           getCheckedInJdk11(),
           getCheckedInJdk17(),
           getCheckedInJdk21(),
-          getCheckedInJdk22(),
           getCheckedInJdk23()
         };
     Builder<CfRuntime> builder = ImmutableList.builder();
@@ -243,9 +234,6 @@
     if (version.equals("21") || version.startsWith("21.")) {
       return new CfRuntime(CfVm.JDK21, Paths.get(home));
     }
-    if (version.equals("22") || version.startsWith("22.")) {
-      return new CfRuntime(CfVm.JDK22, Paths.get(home));
-    }
     if (version.equals("23") || version.startsWith("23.")) {
       return new CfRuntime(CfVm.JDK23, Paths.get(home));
     }
diff --git a/tools/jdk.py b/tools/jdk.py
index 745f1c1..d795230 100755
--- a/tools/jdk.py
+++ b/tools/jdk.py
@@ -10,9 +10,8 @@
 
 JDK_DIR = os.path.join(defines.THIRD_PARTY, 'openjdk')
 
-# TODO(b/383073689) Remove JDK-22 when bots test JDK-23.
 ALL_JDKS = ['openjdk-9.0.4', 'jdk-11', 'jdk-15', 'jdk-16', 'jdk-17',
-            'jdk-18', 'jdk-21', 'jdk-22', 'jdk-23']
+            'jdk-18', 'jdk-21', 'jdk-23']
 
 
 def GetJdkHome():
diff --git a/tools/test.py b/tools/test.py
index 3b52a4b..666f627 100755
--- a/tools/test.py
+++ b/tools/test.py
@@ -45,7 +45,6 @@
 NUMBER_OF_TEST_REPORTS = 5
 REPORTS_PATH = os.path.join(utils.BUILD, 'reports')
 REPORT_INDEX = ['tests', 'test', 'index.html']
-# TODO(b/383073689) Remove JDK-22 when bots test JDK-23.
 VALID_RUNTIMES = [
     'none',
     'jdk8',
@@ -53,7 +52,6 @@
     'jdk11',
     'jdk17',
     'jdk21',
-    'jdk22',
     'jdk23',
 ] + ['dex-%s' % dexvm for dexvm in ALL_ART_VMS]