Fail Java compile action when reduced classpath computation fails

A Java compile action may fail to compute a reduced classpath if one of
the jdeps files it tries to read is unreadable.

With this CL, instead of falling back to a full classpath, the action
will fail.

RELNOTES: None.
PiperOrigin-RevId: 281095357
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java
index c2a5da4..f13472d 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java
@@ -314,13 +314,10 @@
             actionExecutionContext.getContext(JavaCompileActionContext.class);
         try {
           reducedClasspath = getReducedClasspath(actionExecutionContext, context);
-          spawn = getReducedSpawn(actionExecutionContext, reducedClasspath, /* fallback= */ false);
         } catch (IOException e) {
-          // There was an error reading some of the dependent .jdeps files. Fall back to a
-          // compilation with the full classpath.
-          reducedClasspath = null;
-          spawn = getFullSpawn(actionExecutionContext);
+          throw new ActionExecutionException(e, this, /*catastrophe=*/ false);
         }
+        spawn = getReducedSpawn(actionExecutionContext, reducedClasspath, /* fallback= */ false);
       } else {
         reducedClasspath = null;
         spawn = getFullSpawn(actionExecutionContext);
@@ -448,7 +445,6 @@
     }
 
     @Override
-    @SuppressWarnings("unchecked")
     public Iterable<? extends ActionInput> getInputFiles() {
       return inputs;
     }