Automated rollback of commit 366de6958ff449b273079be551c443ace2d8e7fa.

*** Reason for rollback ***

Blaze is still passing these flags in some places (b/171813648)

*** Original change description ***

Remove obsolete flags

PiperOrigin-RevId: 339319693
diff --git a/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/OptionsParser.java b/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/OptionsParser.java
index 60d04e1..a3f2bed 100644
--- a/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/OptionsParser.java
+++ b/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/OptionsParser.java
@@ -196,12 +196,24 @@
         case "--builtin_processors":
           collectProcessorArguments(builtinProcessorNames, argQueue, "-");
           break;
+        case "--extclasspath":
+        case "--extdir":
+          // TODO(b/149114743): delete once Blaze stops passing the flag
+          collectFlagArguments(new ArrayList<>(), argQueue, "-");
+          break;
         case "--output":
           outputJar = getArgument(argQueue, arg);
           break;
         case "--native_header_output":
           nativeHeaderOutput = getArgument(argQueue, arg);
           break;
+        case "--classdir":
+        case "--gendir":
+        case "--sourcegendir":
+        case "--tempdir":
+          // TODO(bazel-team) - remove when Bazel no longer passes these flags to buildjar.
+          getArgument(argQueue, arg);
+          break;
         case "--post_processor":
           addExternalPostProcessor(argQueue, arg);
           break;
diff --git a/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/genclass/GenClassOptionsParser.java b/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/genclass/GenClassOptionsParser.java
index e6ed6e8..795eac0 100644
--- a/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/genclass/GenClassOptionsParser.java
+++ b/src/java_tools/buildjar/java/com/google/devtools/build/buildjar/genclass/GenClassOptionsParser.java
@@ -36,6 +36,10 @@
         case "--output_jar":
           builder.setOutputJar(readPath(it));
           break;
+        case "--temp_dir":
+          // TODO(b/169793789): remove once Blaze no longer passes the flag
+          readPath(it);
+          break;
         default:
           throw new IllegalArgumentException(
               String.format("Unexpected argument: '%s' in %s", arg, args));