aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/actions/AbstractAction.java
diff options
context:
space:
mode:
authorGravatar Michajlo Matijkiw <michajlo@google.com>2015-03-20 16:40:53 +0000
committerGravatar Damien Martin-Guillerez <dmarting@google.com>2015-03-23 11:52:31 +0000
commit5df6cb34827ae3773a27199b290980fb241e65a5 (patch)
tree96cff532f80b99936a7a9dfe0076003471b8a387 /src/main/java/com/google/devtools/build/lib/actions/AbstractAction.java
parentb5ba24a3f3ee0e7da718bf8becac96d691ae2074 (diff)
remove ActionMetadata#getInputCount
Removing ActionMetadata#getInputCount instead of relying on all implementations of ActionMetadata keeping getInputCount and getInputs in sync. getInputCount is only used by a few tests and has no applications in the main code at the moment, so it is trivial to remove before we may come to rely on it more or its semantics get more complicated. -- MOS_MIGRATED_REVID=89130009
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/actions/AbstractAction.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/AbstractAction.java16
1 files changed, 0 insertions, 16 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 324d0b4608..f686334815 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
@@ -61,7 +61,6 @@ public abstract class AbstractAction implements Action {
private Iterable<Artifact> inputs;
private final ImmutableSet<Artifact> outputs;
- private int cachedInputCount = -1;
private String cachedKey;
/**
@@ -131,21 +130,6 @@ public abstract class AbstractAction implements Action {
protected void setInputs(Iterable<Artifact> inputs) {
Preconditions.checkState(discoversInputs(), this);
this.inputs = CollectionUtils.makeImmutable(inputs);
- cachedInputCount = -1;
- }
-
- /*
- * Get count of inputs.
- *
- * <p>Computes the count on first invocation, returns cached value for further invocations.
- */
- @Override
- @ThreadSafe
- public synchronized int getInputCount() {
- if (cachedInputCount == -1) {
- cachedInputCount = Iterables.size(getInputs());
- }
- return cachedInputCount;
}
@Override