diff --git a/src/main/java/com/android/tools/metalava/CompatibilityCheck.kt b/src/main/java/com/android/tools/metalava/CompatibilityCheck.kt
index 119c545..98d54bb 100644
--- a/src/main/java/com/android/tools/metalava/CompatibilityCheck.kt
+++ b/src/main/java/com/android/tools/metalava/CompatibilityCheck.kt
@@ -176,20 +176,22 @@
     }
 
     override fun compare(old: ParameterItem, new: ParameterItem) {
-        val prevName = old.publicName() ?: return
+        val prevName = old.publicName()
         val newName = new.publicName()
-        if (newName == null) {
-            report(
-                Issues.PARAMETER_NAME_CHANGE,
-                new,
-                "Attempted to remove parameter name from ${describe(new)}"
-            )
-        } else if (newName != prevName) {
-            report(
-                Issues.PARAMETER_NAME_CHANGE,
-                new,
-                "Attempted to change parameter name from $prevName to $newName in ${describe(new.containingMethod())}"
-            )
+        if (prevName != null) {
+            if (newName == null) {
+                report(
+                    Issues.PARAMETER_NAME_CHANGE,
+                    new,
+                    "Attempted to remove parameter name from ${describe(new)}"
+                )
+            } else if (newName != prevName) {
+                report(
+                    Issues.PARAMETER_NAME_CHANGE,
+                    new,
+                    "Attempted to change parameter name from $prevName to $newName in ${describe(new.containingMethod())}"
+                )
+            }
         }
 
         if (old.hasDefaultValue() && !new.hasDefaultValue()) {
diff --git a/src/test/java/com/android/tools/metalava/binarycompatibility/BinaryCompatibilityClassMethodsAndConstructors.kt b/src/test/java/com/android/tools/metalava/binarycompatibility/BinaryCompatibilityClassMethodsAndConstructors.kt
index b7abbf3..758d5f0 100644
--- a/src/test/java/com/android/tools/metalava/binarycompatibility/BinaryCompatibilityClassMethodsAndConstructors.kt
+++ b/src/test/java/com/android/tools/metalava/binarycompatibility/BinaryCompatibilityClassMethodsAndConstructors.kt
@@ -579,44 +579,48 @@
             """
         )
     }
+    */
+
     @Test
     fun `Change last parameter from array type T(array) to variable arity T(elipse) (Compatible)`() {
         check(
             signatureSource = """
                 package test.pkg {
-                  class Foo {
-                    method public <T> void bar(T...);
-                  }
+                    class Foo {
+                        method public <T> void bar(T...);
+                    }
                 }
             """,
             checkCompatibilityApiReleased = """
                 package test.pkg {
-                  class Foo {
-                    method public <T> void bar(T[]);
-                  }
-                }
-            """
-        )
-    }
-    @Test
-    fun `Change last parameter from variable arity T(elipse) to array type T(array) (Incompatible)`() {
-        check(
-            signatureSource = """
-                package test.pkg {
-                  class Foo {
-                    method public <T> void bar(T[]);
-                  }
-                }
-            """,
-            checkCompatibilityApiReleased = """
-                package test.pkg {
-                  class Foo {
-                    method public <T> void bar(T...);
-                  }
+                    class Foo {
+                        method public <T> void bar(T[]);
+                    }
                 }
             """
         )
     }
 
-    */
+    @Test
+    fun `Change last parameter from variable arity T(elipse) to array type T(array) (Incompatible)`() {
+        check(
+            expectedIssues = """
+                TESTROOT/load-api.txt:3: error: Changing from varargs to array is an incompatible change: parameter arg1 in test.pkg.Foo.bar(T[] arg1) [VarargRemoval]
+            """,
+            signatureSource = """
+                package test.pkg {
+                    class Foo {
+                        method public <T> void bar(T[]);
+                    }
+                }
+            """,
+            checkCompatibilityApiReleased = """
+                package test.pkg {
+                    class Foo {
+                        method public <T> void bar(T...);
+                    }
+                }
+            """
+        )
+    }
 }
diff --git a/src/test/java/com/android/tools/metalava/binarycompatibility/BinaryCompatibilityInterfaceMethodsTest.kt b/src/test/java/com/android/tools/metalava/binarycompatibility/BinaryCompatibilityInterfaceMethodsTest.kt
index 168ea59..04e74f4 100644
--- a/src/test/java/com/android/tools/metalava/binarycompatibility/BinaryCompatibilityInterfaceMethodsTest.kt
+++ b/src/test/java/com/android/tools/metalava/binarycompatibility/BinaryCompatibilityInterfaceMethodsTest.kt
@@ -414,22 +414,23 @@
             """
         )
     }
+     */
 
     @Test
     fun `Change last parameter from array type T(array) to variable arity T(elipse) (Compatible)`() {
         check(
             signatureSource = """
                 package test.pkg {
-                  class Foo {
-                    method public <T> void bar(T...);
-                  }
+                    interface Foo {
+                        method public <T> void bar(T...);
+                    }
                 }
             """,
             checkCompatibilityApiReleased = """
                 package test.pkg {
-                  class Foo {
-                    method public <T> void bar(T[]);
-                  }
+                    interface Foo {
+                        method public <T> void bar(T[]);
+                    }
                 }
             """
         )
@@ -438,25 +439,26 @@
     @Test
     fun `Change last parameter from variable arity T(elipse) to array type T(array) (Incompatible)`() {
         check(
+            expectedIssues = """
+                TESTROOT/load-api.txt:3: error: Changing from varargs to array is an incompatible change: parameter arg1 in test.pkg.Foo.bar(T[] arg1) [VarargRemoval]
+            """,
             signatureSource = """
                 package test.pkg {
-                  class Foo {
-                    method public <T> void bar(T[]);
-                  }
+                    interface Foo {
+                        method public <T> void bar(T[]);
+                    }
                 }
             """,
             checkCompatibilityApiReleased = """
                 package test.pkg {
-                  class Foo {
-                    method public <T> void bar(T...);
-                  }
+                    interface Foo {
+                        method public <T> void bar(T...);
+                    }
                 }
             """
         )
     }
 
-     */
-
     @Test
     fun `Add default clause to annotation type element (Compatible)`() {
         check(
