Delete deprecated hash mismatch flag in ZipFilterAction

PiperOrigin-RevId: 761615259
Change-Id: I354d3bb5e8b60ba63ec72107a1a00fa93f066960
diff --git a/src/tools/java/com/google/devtools/build/android/ZipFilterAction.java b/src/tools/java/com/google/devtools/build/android/ZipFilterAction.java
index 3ff0968..613ab5c 100644
--- a/src/tools/java/com/google/devtools/build/android/ZipFilterAction.java
+++ b/src/tools/java/com/google/devtools/build/android/ZipFilterAction.java
@@ -133,26 +133,6 @@
               + "same name are different."
     )
     HashMismatchCheckMode hashMismatchCheckMode = HashMismatchCheckMode.WARN;
-
-    /**
-     * @deprecated please use --checkHashMismatch ERROR instead. Other options are IGNORE and WARN.
-     */
-    @Deprecated
-    @Parameter(
-      names = "--errorOnHashMismatch",
-      description = "Error on entry filter with hash mismatch."
-    )
-    boolean errorOnHashMismatch = false;
-
-    /**
-     * @deprecated please use --checkHashMismatch WARN instead. Other options are IGNORE and WARN.
-     *     <p>This is a hack to support existing users of --noerrorOnHashMismatch. JCommander does
-     *     not support setting boolean flags with "--no", so instead we set the default to false and
-     *     just ignore anyone who passes --noerrorOnHashMismatch.
-     */
-    @Deprecated
-    @Parameter(names = "--noerrorOnHashMismatch")
-    boolean ignored = false;
   }
 
   /** Converts string flags to paths. Public because JCommander invokes this by reflection. */
@@ -247,11 +227,6 @@
       }
     }
 
-    // TODO(jingwen): Remove --errorOnHashMismatch when Blaze release with --checkHashMismatch
-    // is checked in.
-    if (options.errorOnHashMismatch) {
-      options.hashMismatchCheckMode = HashMismatchCheckMode.ERROR;
-    }
     ZipFilterEntryFilter entryFilter =
         new ZipFilterEntryFilter(
             explicitFilter,
diff --git a/src/tools/javatests/com/google/devtools/build/android/ZipFilterActionTest.java b/src/tools/javatests/com/google/devtools/build/android/ZipFilterActionTest.java
index 49fdaad..79e4d08 100644
--- a/src/tools/javatests/com/google/devtools/build/android/ZipFilterActionTest.java
+++ b/src/tools/javatests/com/google/devtools/build/android/ZipFilterActionTest.java
@@ -319,14 +319,15 @@
     File output = tmp.newFile();
     output.delete();
     Path filter = createZip("foo.java", "bar.class");
-    ImmutableList<String> args = ImmutableList.of(
-        "--inputZip", input.toFile().getPath(),
-        "--outputZip", output.getPath(),
-        "--filterZips", filter.toFile().getPath(),
-        "--filterTypes", ".class",
-        "--explicitFilters", "bar\\.class",
-        "--outputMode", "DONT_CARE",
-        "--errorOnHashMismatch");
+    ImmutableList<String> args =
+        ImmutableList.of(
+            "--inputZip", input.toFile().getPath(),
+            "--outputZip", output.getPath(),
+            "--filterZips", filter.toFile().getPath(),
+            "--filterTypes", ".class",
+            "--explicitFilters", "bar\\.class",
+            "--outputMode", "DONT_CARE",
+            "--checkHashMismatch", "ERROR");
     assertThat(outputEntriesWithArgs(args, output)).containsExactly("foo.java", "baz.class");
   }