Version 1.4.55

This CL also disables debugging tests that fail when running on some
bots using an internal JDK build.

Cherry-pick: Rewrite @IgnoreIfVmOlderThan to assumeTrue
CL: https://r8-review.googlesource.com/c/r8/+/34568

Cherry-pick: Check for array types in IdentifierNameStringUtils
CL: https://r8-review.googlesource.com/c/r8/+/33380

Bug: 124655989, 123390221
Change-Id: I3c2ef576921299259e9e84b9b9c427e209d36ce0
diff --git a/src/main/java/com/android/tools/r8/Version.java b/src/main/java/com/android/tools/r8/Version.java
index 543f16a..8439083 100644
--- a/src/main/java/com/android/tools/r8/Version.java
+++ b/src/main/java/com/android/tools/r8/Version.java
@@ -11,7 +11,7 @@
 
   // This field is accessed from release scripts using simple pattern matching.
   // Therefore, changing this field could break our release scripts.
-  public static final String LABEL = "1.4.54";
+  public static final String LABEL = "1.4.55";
 
   private Version() {
   }
diff --git a/src/main/java/com/android/tools/r8/naming/IdentifierNameStringUtils.java b/src/main/java/com/android/tools/r8/naming/IdentifierNameStringUtils.java
index cdf96c2..706620f 100644
--- a/src/main/java/com/android/tools/r8/naming/IdentifierNameStringUtils.java
+++ b/src/main/java/com/android/tools/r8/naming/IdentifierNameStringUtils.java
@@ -171,6 +171,11 @@
         return null;
       }
       DexType holderType = classValue.getConstInstruction().asConstClass().getValue();
+      if (holderType.isArrayType()) {
+        // None of the fields or methods of an array type will be renamed, since they are all
+        // declared in the library. Hence there is no need to handle this case.
+        return null;
+      }
       DexClass holder = appInfo.definitionFor(holderType);
       if (holder == null) {
         return null;
diff --git a/src/test/java/com/android/tools/r8/debug/LambdaOuterContextTestRunner.java b/src/test/java/com/android/tools/r8/debug/LambdaOuterContextTestRunner.java
index 99a19f5..32fde40 100644
--- a/src/test/java/com/android/tools/r8/debug/LambdaOuterContextTestRunner.java
+++ b/src/test/java/com/android/tools/r8/debug/LambdaOuterContextTestRunner.java
@@ -23,7 +23,8 @@
   public void testJvm() throws Throwable {
     JvmTestBuilder jvmTestBuilder = testForJvm().addTestClasspath();
     jvmTestBuilder.run(CLASS).assertSuccessWithOutput(EXPECTED);
-    runDebugger(jvmTestBuilder.debugConfig());
+    // b/123390221: The 1.4 release branch may be using a broken JDK which breaks this test.
+    // runDebugger(jvmTestBuilder.debugConfig());
   }
 
   @Test
@@ -31,7 +32,8 @@
     D8TestCompileResult compileResult =
         testForD8().addProgramClassesAndInnerClasses(CLASS).compile();
     compileResult.run(CLASS).assertSuccessWithOutput(EXPECTED);
-    runDebugger(compileResult.debugConfig());
+    // b/123390221: The 1.4 release branch may be using a broken JDK which breaks this test.
+    // runDebugger(compileResult.debugConfig());
   }
 
   @Test
@@ -44,7 +46,8 @@
             .noTreeShaking()
             .compile();
     compileResult.run(CLASS).assertSuccessWithOutput(EXPECTED);
-    runDebugger(compileResult.debugConfig());
+    // b/123390221: The 1.4 release branch may be using a broken JDK which breaks this test.
+    // runDebugger(compileResult.debugConfig());
   }
 
   private void runDebugger(DebugTestConfig config) throws Throwable {
diff --git a/src/test/java/com/android/tools/r8/debug/LambdaTest.java b/src/test/java/com/android/tools/r8/debug/LambdaTest.java
index f9e6c34..7b7b049 100644
--- a/src/test/java/com/android/tools/r8/debug/LambdaTest.java
+++ b/src/test/java/com/android/tools/r8/debug/LambdaTest.java
@@ -9,6 +9,7 @@
 import java.util.Collection;
 import org.junit.Assert;
 import org.junit.Test;
+import org.junit.Ignore;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 import org.junit.runners.Parameterized.Parameters;
@@ -36,6 +37,7 @@
   }
 
   @Test
+  @Ignore("b/123390221: The 1.4 release branch may be using a broken JDK which breaks this test.")
   public void testLambda_ExpressionOnSameLine() throws Throwable {
     String debuggeeClass = "DebugLambda";
     String initialMethodName = "printInt";
diff --git a/src/test/java/com/android/tools/r8/desugar/DefaultLambdaWithUnderscoreThisTestRunner.java b/src/test/java/com/android/tools/r8/desugar/DefaultLambdaWithUnderscoreThisTestRunner.java
index 10d74a8..f66da72 100644
--- a/src/test/java/com/android/tools/r8/desugar/DefaultLambdaWithUnderscoreThisTestRunner.java
+++ b/src/test/java/com/android/tools/r8/desugar/DefaultLambdaWithUnderscoreThisTestRunner.java
@@ -63,7 +63,8 @@
   public void testJvm() throws Throwable {
     JvmTestBuilder builder = testForJvm().addTestClasspath();
     builder.run(CLASS).assertSuccessWithOutput(EXPECTED);
-    runDebugger(builder.debugConfig());
+    // b/123390221: The 1.4 release branch may be using a broken JDK which breaks this test.
+    // runDebugger(builder.debugConfig());
   }
 
   @Test
@@ -76,6 +77,7 @@
         // TODO(b/123506120): Add .assertNoMessages()
         .run(CLASS)
         .assertSuccessWithOutput(EXPECTED);
-    runDebugger(compileResult.debugConfig());
+    // b/123390221: The 1.4 release branch may be using a broken JDK which breaks this test.
+    // runDebugger(compileResult.debugConfig());
   }
 }
diff --git a/src/test/java/com/android/tools/r8/shaking/keptgraph/KeptViaClassInitializerTestRunner.java b/src/test/java/com/android/tools/r8/shaking/keptgraph/KeptViaClassInitializerTestRunner.java
index 344721f..50ee3e2 100644
--- a/src/test/java/com/android/tools/r8/shaking/keptgraph/KeptViaClassInitializerTestRunner.java
+++ b/src/test/java/com/android/tools/r8/shaking/keptgraph/KeptViaClassInitializerTestRunner.java
@@ -9,13 +9,13 @@
 import static org.hamcrest.CoreMatchers.not;
 import static org.hamcrest.MatcherAssert.assertThat;
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assume.assumeTrue;
 
 import com.android.tools.r8.NeverClassInline;
 import com.android.tools.r8.NeverMerge;
 import com.android.tools.r8.TestBase;
 import com.android.tools.r8.ToolHelper;
 import com.android.tools.r8.ToolHelper.DexVm.Version;
-import com.android.tools.r8.VmTestRunner.IgnoreIfVmOlderThan;
 import com.android.tools.r8.origin.Origin;
 import com.android.tools.r8.references.MethodReference;
 import com.android.tools.r8.shaking.WhyAreYouKeepingConsumer;
@@ -67,7 +67,6 @@
     }
   }
 
-  private static final Class<?> CLASS = Main.class;
   private static final String EXPECTED = StringUtils.lines("I'm an A");
 
   private final Backend backend;
@@ -82,8 +81,9 @@
   }
 
   @Test
-  @IgnoreIfVmOlderThan(Version.V7_0_0)
   public void testKeptMethod() throws Exception {
+    assumeTrue(ToolHelper.getDexVm().getVersion().isAtLeast(Version.V7_0_0));
+
     MethodReference mainMethod =
         methodFromMethod(Main.class.getDeclaredMethod("main", String[].class));
 
@@ -116,7 +116,7 @@
     assertThat(baos.toString(), containsString("is kept for unknown reason"));
 
     // TODO(b/124499108): Currently synthetic lambda classes are referenced,
-    // should be their originating context.
+    //  should be their originating context.
     if (backend == Backend.DEX) {
       assertThat(baos.toString(), containsString("-$$Lambda$"));
     } else {