Don't return the Jvm label as an implicit label from the Jvm fragment. The production JvmConfigurationLoader never invents Jvm labels, and this is only used for the sanity check that all implicit labels can be derived from explicit labels. Unfortunately, our tests often use the MockJvmFactory, which happily invents Jvm labels. This is a step towards making the sanity check run unconditionally. -- MOS_MIGRATED_REVID=116125095
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/Jvm.java b/src/main/java/com/google/devtools/build/lib/rules/java/Jvm.java index 5888013..e24266d 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/Jvm.java +++ b/src/main/java/com/google/devtools/build/lib/rules/java/Jvm.java
@@ -15,7 +15,6 @@ package com.google.devtools.build.lib.rules.java; import com.google.common.collect.ImmutableMap.Builder; -import com.google.common.collect.Multimap; import com.google.devtools.build.lib.analysis.config.BuildConfiguration; import com.google.devtools.build.lib.cmdline.Label; import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable; @@ -54,13 +53,6 @@ this.java = getJavaHome().getRelative("bin/java" + OsUtils.executableExtension()); } - @Override - public void addImplicitLabels(Multimap<String, Label> implicitLabels) { - if (jvmLabel != null) { - implicitLabels.put("Jvm", jvmLabel); - } - } - /** * Returns a path fragment that determines the path to the installation * directory. It is either absolute or relative to the execution root.