aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/genquery/GenQuery.java
diff options
context:
space:
mode:
authorGravatar janakr <janakr@google.com>2017-09-12 20:25:00 +0200
committerGravatar Philipp Wollermann <philwo@google.com>2017-09-13 19:05:59 +0200
commitd9b634687e154cdff2c8fb4c553149aad1d2cf86 (patch)
treef0c1d253c4a8192fdf57d6b1df02845b6a1296cf /src/main/java/com/google/devtools/build/lib/rules/genquery/GenQuery.java
parent7da54b5e2942bdb444abbf68ac3c7f34a453b4d9 (diff)
Don't allow injection of non-default output formatters for genquery rule.
PiperOrigin-RevId: 168406412
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/genquery/GenQuery.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/genquery/GenQuery.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/genquery/GenQuery.java b/src/main/java/com/google/devtools/build/lib/rules/genquery/GenQuery.java
index 2ff3d84338..4e34a7b6da 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/genquery/GenQuery.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/genquery/GenQuery.java
@@ -305,12 +305,9 @@ public class GenQuery implements RuleConfiguredTargetFactory {
// behavior of the query engine in these two use cases.
settings.add(Setting.NO_NODEP_DEPS);
- ImmutableList<OutputFormatter> outputFormatters = QUERY_OUTPUT_FORMATTERS.get(
- ruleContext.getAnalysisEnvironment().getSkyframeEnv());
- // This is a precomputed value so it should have been injected by the rules module by the
- // time we get there.
- formatter = OutputFormatter.getFormatter(
- Preconditions.checkNotNull(outputFormatters), queryOptions.outputFormat);
+ formatter =
+ OutputFormatter.getFormatter(
+ OutputFormatter.getDefaultFormatters(), queryOptions.outputFormat);
// All the packages are already loaded at this point, so there is no need
// to start up many threads. 4 are started up to make good use of multiple
// cores.