Drive-by clean-up: Remove unused visitedMap
@@ -16,11 +16,8 @@ package com.google.devtools.build.lib.query2;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.base.Throwables;
-import com.google.common.collect.HashMultimap;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMultimap;
-import com.google.common.collect.Multimaps;
-import com.google.common.collect.SetMultimap;
import com.google.devtools.build.lib.cmdline.Label;
import com.google.devtools.build.lib.concurrent.AbstractQueueVisitor;
import com.google.devtools.build.lib.concurrent.ErrorClassifier;
@@ -35,7 +32,6 @@ import com.google.devtools.build.lib.packages.DependencyFilter;
import com.google.devtools.build.lib.packages.InputFile;
import com.google.devtools.build.lib.packages.NoSuchThingException;
import com.google.devtools.build.lib.packages.OutputFile;
-import com.google.devtools.build.lib.packages.Package;
import com.google.devtools.build.lib.packages.PackageGroup;
import com.google.devtools.build.lib.packages.Rule;
import com.google.devtools.build.lib.packages.RuleClass;
@@ -150,8 +146,6 @@ final class LabelVisitor {
*/
private final TargetProvider targetProvider;
private final DependencyFilter edgeFilter;
- private final SetMultimap<Package, Target> visitedMap =
- Multimaps.synchronizedSetMultimap(HashMultimap.<Package, Target>create());
private final ConcurrentMap<Label, Integer> visitedTargets = new ConcurrentHashMap<>();
private VisitationAttributes lastVisitation;
@@ -207,7 +201,6 @@ final class LabelVisitor {
int maxDepth,
TargetEdgeObserver... observers)
throws InterruptedException {
- visitedMap.clear();
visitedTargets.clear();
Visitor visitor = new Visitor(eventHandler, keepGoing, parallelThreads, maxDepth, observers);
@@ -400,8 +393,6 @@ final class LabelVisitor {
observeEdge(from, attribute, target);
visitAspectsIfRequired(from, attribute, target, depth, count);
}
-
- visitedMap.put(target.getPackage(), target);
visitTargetNode(target, depth, count);
}
