aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/actions
diff options
context:
space:
mode:
authorGravatar shahan <shahan@google.com>2018-06-26 11:24:59 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-06-26 11:27:44 -0700
commitef6f4cff9ee3e0c92b61f59ca0585f63ff17e9a4 (patch)
tree18edd2f65766e2f61f0fe38d4b44497ced83dd09 /src/main/java/com/google/devtools/build/lib/actions
parent89dfee5221180aa49b559f22eb6d5bf6bc14c769 (diff)
Instead of depending on mutable inputs of upstream CppCompileAction instances,
CppCompileAction.discoverInputsStage2 retrieves values of discovered modules from ActionExecutionValue. This addresses a possible a correctness issue. PiperOrigin-RevId: 202162180
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions')
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/AbstractAction.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/AbstractAction.java b/src/main/java/com/google/devtools/build/lib/actions/AbstractAction.java
index d5dbb8b686..44db64bf46 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/AbstractAction.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/AbstractAction.java
@@ -206,9 +206,8 @@ public abstract class AbstractAction implements Action, ActionApi {
}
/**
- * Should be called when the inputs of the action become known, that is, either during
- * {@link #discoverInputs(ActionExecutionContext)} or during
- * {@link #execute(ActionExecutionContext)}.
+ * Should be called when the inputs of the action become known, that is, either during {@link
+ * #discoverInputs(ActionExecutionContext)} or during {@link #execute(ActionExecutionContext)}.
*
* <p>When an action discovers inputs, it must have been called by the time {@code #execute()}
* returns. It can be called both during {@code discoverInputs} and during {@code execute()}.
@@ -217,7 +216,7 @@ public abstract class AbstractAction implements Action, ActionApi {
* itself when an action is loaded from the on-disk action cache.
*/
@Override
- public final synchronized void updateInputs(Iterable<Artifact> inputs) {
+ public synchronized void updateInputs(Iterable<Artifact> inputs) {
this.inputs = CollectionUtils.makeImmutable(inputs);
inputsDiscovered = true;
}