aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib
diff options
context:
space:
mode:
authorGravatar Ulf Adams <ulfjack@google.com>2015-09-04 12:10:53 +0000
committerGravatar Dmitry Lomov <dslomov@google.com>2015-09-04 12:53:08 +0000
commit3ab82f767981c5bb32e041a3d08b8dc9f41625e2 (patch)
tree6c31f94248a8bd7dffca0564e08670f11a2e177a /src/main/java/com/google/devtools/build/lib
parentb7a69e551e4da9f8a4f7a4649c7843044d122732 (diff)
Fix some warnings.
-- MOS_MIGRATED_REVID=102332437
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib')
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/ArtifactFactory.java6
-rw-r--r--src/main/java/com/google/devtools/build/lib/actions/LocalHostCapacity.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/BuildView.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java1
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/RuleDefinition.java4
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/dash/DashModule.java5
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/repository/GitProgressMonitor.java5
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/repository/HttpDownloadFunction.java3
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/repository/HttpDownloader.java6
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/repository/HttpFileFunction.java1
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/repository/HttpJarFunction.java1
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/BazelConfiguration.java1
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/cpp/BazelCppRuleClasses.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/cmdline/PackageIdentifier.java5
-rw-r--r--src/main/java/com/google/devtools/build/lib/cmdline/TargetPattern.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/graph/Digraph.java8
-rw-r--r--src/main/java/com/google/devtools/build/lib/graph/DotSyntaxException.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/packages/Package.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/packages/RuleClass.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/packages/RuleFactory.java4
-rw-r--r--src/main/java/com/google/devtools/build/lib/query2/BlazeQueryEnvironment.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/query2/BlazeTargetAccessor.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/query2/SkyQueryEnvironment.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/query2/engine/AllRdepsFunction.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/query2/output/GraphOutputFormatter.java4
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppDebugPackageProvider.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppModel.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/FdoSupport.java3
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/IncludeScanner.java9
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/LTOBackendArtifacts.java4
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/java/JavaSourceInfoProvider.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/nativedeps/NativeDepsHelper.java5
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/test/TestStrategy.java4
-rw-r--r--src/main/java/com/google/devtools/build/lib/shell/SimpleKillableObserver.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/ASTFileLookupValue.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java10
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java4
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/PrepareDepsOfPatternFunction.java7
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/RecursiveDirectoryTraversalFunction.java16
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java4
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/SkylarkImportLookupFunction.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/SkylarkModuleCycleReporter.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTargetFunction.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTargetValue.java9
46 files changed, 87 insertions, 84 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/actions/ArtifactFactory.java b/src/main/java/com/google/devtools/build/lib/actions/ArtifactFactory.java
index 5ca59314b8..8f11efc437 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/ArtifactFactory.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/ArtifactFactory.java
@@ -284,10 +284,10 @@ public class ArtifactFactory implements ArtifactResolver, ArtifactSerializer, Ar
}
/**
- * Returns an {@link Artifact} with exec path formed by composing {@param baseExecPath} and
- * {@param relativePath} (via {@code baseExecPath.getRelative(relativePath)} if baseExecPath is
+ * Returns an {@link Artifact} with exec path formed by composing {@code baseExecPath} and
+ * {@code relativePath} (via {@code baseExecPath.getRelative(relativePath)} if baseExecPath is
* not null). That Artifact will have root determined by the package roots of this factory if it
- * lives in a subpackage distinct from that of baseExecPath, and {@param baseRoot} otherwise.
+ * lives in a subpackage distinct from that of baseExecPath, and {@code baseRoot} otherwise.
*/
public synchronized Artifact resolveSourceArtifactWithAncestor(
PathFragment relativePath, PathFragment baseExecPath, Root baseRoot) {
diff --git a/src/main/java/com/google/devtools/build/lib/actions/LocalHostCapacity.java b/src/main/java/com/google/devtools/build/lib/actions/LocalHostCapacity.java
index 8879023cb8..27b45c546a 100644
--- a/src/main/java/com/google/devtools/build/lib/actions/LocalHostCapacity.java
+++ b/src/main/java/com/google/devtools/build/lib/actions/LocalHostCapacity.java
@@ -37,7 +37,7 @@ public final class LocalHostCapacity {
* multiply by 3, and divide by 2^20 because we want megabytes.
*/
private static final ResourceSet DEFAULT_RESOURCES = ResourceSet.create(
- 3.0 * (double) (Runtime.getRuntime().maxMemory() >> 20),
+ 3.0 * (Runtime.getRuntime().maxMemory() >> 20),
Runtime.getRuntime().availableProcessors(), 1.0,
Integer.MAX_VALUE);
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java b/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
index 41f6ecd502..e966e7fb42 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/BuildView.java
@@ -639,7 +639,7 @@ public class BuildView {
}
prepareToBuild(new SkyframePackageRootResolver(skyframeExecutor));
- skyframeExecutor.injectWorkspaceStatusData(configurations);
+ skyframeExecutor.injectWorkspaceStatusData();
SkyframeAnalysisResult skyframeAnalysisResult;
try {
skyframeAnalysisResult =
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
index 0f07e39036..af05afd28d 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
@@ -511,6 +511,7 @@ public final class RuleContext extends TargetContext
* thus ensuring that it doesn't clash with other artifacts generated by other rules using this
* method.
*/
+ @Override
public Artifact getDerivedArtifact(PathFragment rootRelativePath, Root root) {
Preconditions.checkState(rootRelativePath.startsWith(getPackageDirectory()),
"Output artifact '%s' not under package directory '%s' for target '%s'",
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/RuleDefinition.java b/src/main/java/com/google/devtools/build/lib/analysis/RuleDefinition.java
index 2c0fbd9939..6d7cf9fb6e 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/RuleDefinition.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/RuleDefinition.java
@@ -25,7 +25,7 @@ import java.util.List;
/**
* This class is a common ancestor for every rule object.
*
- * <p>Implementors are also required to have the {@link BlazeRule} annotation
+ * <p>Implementors are also required to have the {@link Metadata} annotation
* set.
*/
public interface RuleDefinition {
@@ -36,7 +36,7 @@ public interface RuleDefinition {
*
* @param builder A {@link com.google.devtools.build.lib.packages.RuleClass.Builder} object
* already preloaded with the attributes of the ancestors specified in the {@link
- * BlazeRule} annotation.
+ * Metadata} annotation.
* @param environment The services Blaze provides to rule definitions.
*
* @return the {@link RuleClass} representing the rule.
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/dash/DashModule.java b/src/main/java/com/google/devtools/build/lib/bazel/dash/DashModule.java
index 885144d1bd..8918992ed7 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/dash/DashModule.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/dash/DashModule.java
@@ -16,6 +16,7 @@ package com.google.devtools.build.lib.bazel.dash;
import com.google.common.collect.ImmutableList;
import com.google.common.eventbus.Subscribe;
+import com.google.common.io.ByteStreams;
import com.google.devtools.build.lib.bazel.dash.DashProtos.BuildData;
import com.google.devtools.build.lib.bazel.dash.DashProtos.BuildData.CommandLine.Option;
import com.google.devtools.build.lib.bazel.dash.DashProtos.BuildData.EnvironmentVar;
@@ -178,7 +179,9 @@ public class DashModule extends BlazeModule {
builder.setTruncated(true);
}
byte buffer[] = new byte[(int) fileSize];
- new FileInputStream(log).read(buffer, 0, (int) fileSize);
+ try (FileInputStream in = new FileInputStream(log)) {
+ ByteStreams.readFully(in, buffer);
+ }
builder.setContents(ByteString.copyFrom(buffer));
} catch (IOException e) {
runtime
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/repository/GitProgressMonitor.java b/src/main/java/com/google/devtools/build/lib/bazel/repository/GitProgressMonitor.java
index fce6ef1c77..d4ecd0d539 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/repository/GitProgressMonitor.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/repository/GitProgressMonitor.java
@@ -37,6 +37,7 @@ class GitProgressMonitor implements ProgressMonitor {
this.reporter = reporter;
}
+ @Override
public void start(int totalTasks) {
this.totalTasks = totalTasks;
this.currentTask = 0;
@@ -49,6 +50,7 @@ class GitProgressMonitor implements ProgressMonitor {
+ completedWork + " / " + totalWork + ")"));
}
+ @Override
public void beginTask(String title, int totalWork) {
++currentTask;
// TODO(dzc): Remove this when jgit reports totalTasks correctly in start().
@@ -61,12 +63,15 @@ class GitProgressMonitor implements ProgressMonitor {
report();
}
+ @Override
public boolean isCancelled() { return false; }
+ @Override
public void update(int completed) {
completedWork += completed;
report();
}
+ @Override
public void endTask() { }
}
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/repository/HttpDownloadFunction.java b/src/main/java/com/google/devtools/build/lib/bazel/repository/HttpDownloadFunction.java
index f17f829574..e282de6465 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/repository/HttpDownloadFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/repository/HttpDownloadFunction.java
@@ -72,8 +72,7 @@ public class HttpDownloadFunction implements SkyFunction {
return null;
}
- public static SkyKey key(Rule rule, Path outputDirectory)
- throws RepositoryFunction.RepositoryFunctionException {
+ public static SkyKey key(Rule rule, Path outputDirectory) {
AggregatingAttributeMapper mapper = AggregatingAttributeMapper.of(rule);
String url = mapper.get("url", Type.STRING);
String sha256 = mapper.get("sha256", Type.STRING);
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/repository/HttpDownloader.java b/src/main/java/com/google/devtools/build/lib/bazel/repository/HttpDownloader.java
index 3c6819e78b..42d6c68271 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/repository/HttpDownloader.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/repository/HttpDownloader.java
@@ -104,7 +104,10 @@ public class HttpDownloader {
"Error downloading " + url + " to " + destination + ": " + e.getMessage());
} finally {
scheduler.schedule(new Runnable() {
- public void run() { loggerHandle.cancel(true); }
+ @Override
+ public void run() {
+ loggerHandle.cancel(true);
+ }
}, 0, TimeUnit.SECONDS);
}
@@ -130,6 +133,7 @@ public class HttpDownloader {
private static final String UNITS = " KMGTPEY";
private final double logOfKb = Math.log(1024);
+ @Override
public void run() {
try {
reporter.handle(Event.progress(
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/repository/HttpFileFunction.java b/src/main/java/com/google/devtools/build/lib/bazel/repository/HttpFileFunction.java
index f4cf956470..8a634be0e6 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/repository/HttpFileFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/repository/HttpFileFunction.java
@@ -41,6 +41,7 @@ public class HttpFileFunction extends HttpArchiveFunction {
return compute(env, rule);
}
+ @Override
protected SkyKey decompressorValueKey(Rule rule, Path downloadPath, Path outputDirectory)
throws IOException {
return DecompressorValue.fileKey(
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/repository/HttpJarFunction.java b/src/main/java/com/google/devtools/build/lib/bazel/repository/HttpJarFunction.java
index b3620e86c9..371b420e34 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/repository/HttpJarFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/repository/HttpJarFunction.java
@@ -41,6 +41,7 @@ public class HttpJarFunction extends HttpArchiveFunction {
return compute(env, rule);
}
+ @Override
protected SkyKey decompressorValueKey(Rule rule, Path downloadPath, Path outputDirectory)
throws IOException {
return DecompressorValue.jarKey(
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelConfiguration.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelConfiguration.java
index e8fb4f2ffe..8d1c0a9247 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelConfiguration.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/BazelConfiguration.java
@@ -65,6 +65,7 @@ public class BazelConfiguration extends Fragment {
builder.put("sh", new PathFragment("/bin/bash"));
}
+ @Override
public void setupShellEnvironment(ImmutableMap.Builder<String, String> builder) {
String path = System.getenv("PATH");
builder.put("PATH", path == null ? ":/bin:/usr/bin" : path);
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/cpp/BazelCppRuleClasses.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/cpp/BazelCppRuleClasses.java
index c4c8348b56..9e1b9e1995 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/cpp/BazelCppRuleClasses.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/cpp/BazelCppRuleClasses.java
@@ -143,7 +143,7 @@ public class BazelCppRuleClasses {
@Override
public String getCategory() {
return "lipo";
- };
+ }
};
/**
diff --git a/src/main/java/com/google/devtools/build/lib/cmdline/PackageIdentifier.java b/src/main/java/com/google/devtools/build/lib/cmdline/PackageIdentifier.java
index 034df83daa..92991c21ae 100644
--- a/src/main/java/com/google/devtools/build/lib/cmdline/PackageIdentifier.java
+++ b/src/main/java/com/google/devtools/build/lib/cmdline/PackageIdentifier.java
@@ -282,12 +282,11 @@ public final class PackageIdentifier implements Comparable<PackageIdentifier>, S
return new PackageIdentifier(repo, new PathFragment(packageName));
}
- private Object writeReplace() throws ObjectStreamException {
+ private Object writeReplace() {
return new SerializationProxy(this);
}
- private void readObject(ObjectInputStream in)
- throws IOException, ClassNotFoundException {
+ private void readObject(ObjectInputStream in) throws IOException {
throw new IOException("Serialization is allowed only by proxy");
}
diff --git a/src/main/java/com/google/devtools/build/lib/cmdline/TargetPattern.java b/src/main/java/com/google/devtools/build/lib/cmdline/TargetPattern.java
index 9960b4a332..54fd93254a 100644
--- a/src/main/java/com/google/devtools/build/lib/cmdline/TargetPattern.java
+++ b/src/main/java/com/google/devtools/build/lib/cmdline/TargetPattern.java
@@ -148,7 +148,7 @@ public abstract class TargetPattern implements Serializable {
/**
* Returns {@code true} iff this pattern has type {@code Type.TARGETS_BELOW_DIRECTORY} and
- * {@param directory} is contained by or equals this pattern's directory. For example,
+ * {@code directory} is contained by or equals this pattern's directory. For example,
* returns {@code true} for {@code this = TargetPattern ("//...")} and {@code directory
* = "foo")}.
*/
diff --git a/src/main/java/com/google/devtools/build/lib/graph/Digraph.java b/src/main/java/com/google/devtools/build/lib/graph/Digraph.java
index 1dc178be42..23f898b2e0 100644
--- a/src/main/java/com/google/devtools/build/lib/graph/Digraph.java
+++ b/src/main/java/com/google/devtools/build/lib/graph/Digraph.java
@@ -1050,9 +1050,9 @@ public final class Digraph<T> implements Cloneable {
}
/**
- * Given {@param unordered}, a collection of nodes and a (possibly null) {@param comparator} for
- * their labels, returns a sorted collection if {@param comparator} is non-null, otherwise returns
- * {@param unordered}.
+ * Given {@code unordered}, a collection of nodes and a (possibly null) {@code comparator} for
+ * their labels, returns a sorted collection if {@code comparator} is non-null, otherwise returns
+ * {@code unordered}.
*/
private static <T> Collection<Node<T>> maybeOrderCollection(
Collection<Node<T>> unordered, @Nullable final Comparator<? super T> comparator) {
@@ -1081,7 +1081,7 @@ public final class Digraph<T> implements Cloneable {
/**
* A visitation over the graph that visits all nodes and edges in topological order
* such that each node is visited before any edge coming out of that node; ties among nodes are
- * broken using the provided {@param comparator} if not null; edges are visited in order specified
+ * broken using the provided {@code comparator} if not null; edges are visited in order specified
* by the comparator, <b>not</b> topological order of the target nodes.
*/
public void visitNodesBeforeEdges(
diff --git a/src/main/java/com/google/devtools/build/lib/graph/DotSyntaxException.java b/src/main/java/com/google/devtools/build/lib/graph/DotSyntaxException.java
index adf70aab6b..d3861ce4f3 100644
--- a/src/main/java/com/google/devtools/build/lib/graph/DotSyntaxException.java
+++ b/src/main/java/com/google/devtools/build/lib/graph/DotSyntaxException.java
@@ -15,8 +15,6 @@
package com.google.devtools.build.lib.graph;
-import java.io.File;
-
/**
* <p> A DotSyntaxException represents a syntax error encountered while
* parsing a dot-format fule. Thrown by createFromDotFile if syntax errors
diff --git a/src/main/java/com/google/devtools/build/lib/packages/Package.java b/src/main/java/com/google/devtools/build/lib/packages/Package.java
index 1cd3635f53..92a24fb44e 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/Package.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/Package.java
@@ -768,7 +768,7 @@ public class Package implements Serializable {
/**
* The output instance for this builder. Needs to be instantiated and
* available with name info throughout initialization. All other settings
- * are applied during {@link #build}. See {@link Package#Package(String)}
+ * are applied during {@link #build}. See {@link Package#Package(PackageIdentifier)}
* and {@link Package#finishInit} for details.
*/
protected Package pkg;
diff --git a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java
index ddbda142b7..59fcbb595b 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/RuleClass.java
@@ -191,7 +191,7 @@ public final class RuleClass {
@Override
public String getCategory() {
return "core";
- };
+ }
};
/**
diff --git a/src/main/java/com/google/devtools/build/lib/packages/RuleFactory.java b/src/main/java/com/google/devtools/build/lib/packages/RuleFactory.java
index 485bfa8b6c..33f9d49793 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/RuleFactory.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/RuleFactory.java
@@ -79,7 +79,7 @@ public class RuleFactory {
FuncallExpression ast,
Location location,
ImmutableList<StackTraceElement> stackTrace)
- throws InvalidRuleException, NameConflictException {
+ throws InvalidRuleException {
Preconditions.checkNotNull(ruleClass);
String ruleClassName = ruleClass.getName();
Object nameObject = attributeValues.get("name");
@@ -127,7 +127,7 @@ public class RuleFactory {
EventHandler eventHandler,
FuncallExpression ast,
Location location)
- throws InvalidRuleException, NameConflictException {
+ throws InvalidRuleException {
return createRule(pkgBuilder, ruleClass, attributeValues, eventHandler, ast, location,
ImmutableList.<StackTraceElement>of());
}
diff --git a/src/main/java/com/google/devtools/build/lib/query2/BlazeQueryEnvironment.java b/src/main/java/com/google/devtools/build/lib/query2/BlazeQueryEnvironment.java
index 208087f806..da7c3d9622 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/BlazeQueryEnvironment.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/BlazeQueryEnvironment.java
@@ -168,6 +168,7 @@ public class BlazeQueryEnvironment extends AbstractBlazeQueryEnvironment<Target>
return result;
}
+ @Override
public Target getTarget(Label label) throws TargetNotFoundException, QueryException {
// Can't use strictScope here because we are expecting a target back.
validateScope(label, true);
@@ -355,6 +356,7 @@ public class BlazeQueryEnvironment extends AbstractBlazeQueryEnvironment<Target>
}
};
+ @Override
protected Map<String, Set<Target>> preloadOrThrow(
QueryExpression caller, Collection<String> patterns) throws TargetParsingException {
try {
diff --git a/src/main/java/com/google/devtools/build/lib/query2/BlazeTargetAccessor.java b/src/main/java/com/google/devtools/build/lib/query2/BlazeTargetAccessor.java
index 7e597318af..abba93c709 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/BlazeTargetAccessor.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/BlazeTargetAccessor.java
@@ -43,7 +43,7 @@ import java.util.List;
import java.util.Set;
/**
- * Implementation of {@link TargetAccessor&lt;Target&gt;} that uses an
+ * Implementation of {@link TargetAccessor &lt;Target&gt;} that uses an
* {@link AbstractBlazeQueryEnvironment &lt;Target&gt;} internally to report issues and resolve
* targets.
*/
diff --git a/src/main/java/com/google/devtools/build/lib/query2/SkyQueryEnvironment.java b/src/main/java/com/google/devtools/build/lib/query2/SkyQueryEnvironment.java
index 9bb8fc64d4..fa4e6e2ab4 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/SkyQueryEnvironment.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/SkyQueryEnvironment.java
@@ -525,7 +525,7 @@ public class SkyQueryEnvironment extends AbstractBlazeQueryEnvironment<Target> {
}
/**
- * Get SkyKeys for the FileValues for the given {@param pathFragments}. To do this, we look for a
+ * Get SkyKeys for the FileValues for the given {@code pathFragments}. To do this, we look for a
* package lookup node for each path fragment, since package lookup nodes contain the "root" of a
* package. The returned SkyKeys correspond to FileValues that may not exist in the graph.
*/
diff --git a/src/main/java/com/google/devtools/build/lib/query2/engine/AllRdepsFunction.java b/src/main/java/com/google/devtools/build/lib/query2/engine/AllRdepsFunction.java
index ac2352573c..25cc6a03e4 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/engine/AllRdepsFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/engine/AllRdepsFunction.java
@@ -55,7 +55,7 @@ public class AllRdepsFunction implements QueryFunction {
}
/**
- * Breadth-first search from the argument while sticking to nodes satisfying the {@param universe}
+ * Breadth-first search from the argument while sticking to nodes satisfying the {@code universe}
* predicate.
*/
protected <T> Set<T> eval(QueryEnvironment<T> env, List<Argument> args, Predicate<T> universe)
diff --git a/src/main/java/com/google/devtools/build/lib/query2/output/GraphOutputFormatter.java b/src/main/java/com/google/devtools/build/lib/query2/output/GraphOutputFormatter.java
index ba46ddd317..a877f1399d 100644
--- a/src/main/java/com/google/devtools/build/lib/query2/output/GraphOutputFormatter.java
+++ b/src/main/java/com/google/devtools/build/lib/query2/output/GraphOutputFormatter.java
@@ -80,8 +80,8 @@ class GraphOutputFormatter extends OutputFormatter {
NODE_COMPARATOR.lexicographical();
/**
- * Given {@param collectionOfUnorderedSets}, a collection of sets of nodes, returns a collection
- * of sets with the same elements as {@param collectionOfUnorderedSets} but with a stable
+ * Given {@code collectionOfUnorderedSets}, a collection of sets of nodes, returns a collection
+ * of sets with the same elements as {@code collectionOfUnorderedSets} but with a stable
* iteration order within each set given by the target ordering, and the collection ordered by the
* same induced order.
*/
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppDebugPackageProvider.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppDebugPackageProvider.java
index eadf13220c..0622bd5b24 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppDebugPackageProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppDebugPackageProvider.java
@@ -24,7 +24,7 @@ import javax.annotation.Nullable;
/**
* Provides the binary artifact and its associated .dwp files, if fission is enabled.
- * If Fission ({@link https://gcc.gnu.org/wiki/DebugFission}) is not enabled, the
+ * If Fission ({@url https://gcc.gnu.org/wiki/DebugFission}) is not enabled, the
* dwp file will be null.
*/
@Immutable
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java
index c97d5b6fd1..3779c61fff 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkAction.java
@@ -651,7 +651,7 @@ public final class CppLinkAction extends AbstractAction {
ImmutableList.Builder<LTOBackendArtifacts> ltoOutputs = ImmutableList.builder();
for (Artifact a : allBitcode) {
LTOBackendArtifacts ltoArtifacts = new LTOBackendArtifacts(
- ltoOutputRootPrefix, a, allBitcode, configuration, ruleContext, linkArtifactFactory);
+ ltoOutputRootPrefix, a, allBitcode, ruleContext, linkArtifactFactory);
ltoOutputs.add(ltoArtifacts);
}
return ltoOutputs.build();
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppModel.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppModel.java
index 9ffaba58e7..4ce8c61b3e 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppModel.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppModel.java
@@ -361,7 +361,7 @@ public final class CppModel {
if (ccRelativeName != null) {
cppConfiguration.getFdoSupport().configureCompilation(builder, buildVariables, ruleContext,
- ccRelativeName, usePic, featureConfiguration, cppConfiguration);
+ ccRelativeName, usePic, featureConfiguration);
}
if (gcnoFile != null) {
buildVariables.addVariable("gcov_gcno_file", gcnoFile.getExecPathString());
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/FdoSupport.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/FdoSupport.java
index 1ab6a8b5f4..55db00ac68 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/FdoSupport.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/FdoSupport.java
@@ -460,8 +460,7 @@ public class FdoSupport {
@ThreadSafe
public void configureCompilation(CppCompileActionBuilder builder,
CcToolchainFeatures.Variables.Builder buildVariables, RuleContext ruleContext,
- PathFragment sourceName, boolean usePic, FeatureConfiguration featureConfiguration,
- CppConfiguration cppConfiguration) {
+ PathFragment sourceName, boolean usePic, FeatureConfiguration featureConfiguration) {
// It is a bug if this method is called with useLipo if lipo is disabled. However, it is legal
// if is is called with !useLipo, even though lipo is enabled.
LipoContextProvider lipoInputProvider = CppHelper.getLipoContextProvider(ruleContext);
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/IncludeScanner.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/IncludeScanner.java
index 5e888014b2..872a325132 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/IncludeScanner.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/IncludeScanner.java
@@ -18,7 +18,6 @@ import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterables;
import com.google.common.collect.Sets;
import com.google.devtools.build.lib.actions.ActionExecutionContext;
-import com.google.devtools.build.lib.actions.ActionExecutionException;
import com.google.devtools.build.lib.actions.Artifact;
import com.google.devtools.build.lib.actions.EnvironmentalExecException;
import com.google.devtools.build.lib.actions.ExecException;
@@ -44,9 +43,9 @@ import java.util.Set;
public interface IncludeScanner {
/**
* Processes source files and a list of includes extracted from command line flags. Adds all found
- * files to the provided set {@param includes}.
+ * files to the provided set {@code includes}.
*
- * <p>The resulting set will include {@param mainSource} and {@param sources}. This has no real
+ * <p>The resulting set will include {@code mainSource} and {@code sources}. This has no real
* impact in the case that we are scanning a single source file, since it is already known to be
* an input. However, this is necessary when we have more than one source to scan from, for
* example when building C++ modules. In that case we have one of two possibilities:
@@ -63,7 +62,7 @@ public interface IncludeScanner {
* add the entry points to the inputs here.</li></ol>
* </p>
*
- * <p>{@param mainSource} is the source file relative to which the {@param cmdlineIncludes} are
+ * <p>{@code mainSource} is the source file relative to which the {@code cmdlineIncludes} are
* interpreted.</p>
*/
void process(Artifact mainSource, Collection<Artifact> sources,
@@ -102,7 +101,7 @@ public interface IncludeScanner {
IncludeScannerSupplier includeScannerSupplier,
ActionExecutionContext actionExecutionContext,
String profilerTaskName)
- throws ExecException, InterruptedException, ActionExecutionException {
+ throws ExecException, InterruptedException {
Set<Artifact> includes = Sets.newConcurrentHashSet();
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/LTOBackendArtifacts.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/LTOBackendArtifacts.java
index 945bb1e9ef..5ff749a2a8 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/LTOBackendArtifacts.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/LTOBackendArtifacts.java
@@ -17,10 +17,8 @@ package com.google.devtools.build.lib.rules.cpp;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.devtools.build.lib.actions.Artifact;
-import com.google.devtools.build.lib.actions.Root;
import com.google.devtools.build.lib.analysis.RuleContext;
import com.google.devtools.build.lib.analysis.actions.SpawnAction;
-import com.google.devtools.build.lib.analysis.config.BuildConfiguration;
import com.google.devtools.build.lib.collect.nestedset.NestedSet;
import com.google.devtools.build.lib.vfs.FileSystemUtils;
import com.google.devtools.build.lib.vfs.PathFragment;
@@ -78,12 +76,10 @@ public final class LTOBackendArtifacts {
PathFragment ltoOutputRootPrefix,
Artifact bitcodeFile,
NestedSet<Artifact> allBitCodeFiles,
- BuildConfiguration configuration,
RuleContext ruleContext,
CppLinkAction.LinkArtifactFactory linkArtifactFactory) {
this.bitcodeFile = bitcodeFile;
PathFragment obj = ltoOutputRootPrefix.getRelative(bitcodeFile.getRootRelativePath());
- Root binDir = configuration.getBinDirectory();
objectFile = linkArtifactFactory.create(ruleContext, obj);
imports = linkArtifactFactory.create(
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaSourceInfoProvider.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaSourceInfoProvider.java
index 57ddc6dd09..49f33ac4a6 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaSourceInfoProvider.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaSourceInfoProvider.java
@@ -81,7 +81,7 @@ public final class JavaSourceInfoProvider implements TransitiveInfoProvider {
}
/**
- * Gets the source jars containing the sources of the jars contained in {@link getJarFiles()}.
+ * Gets the source jars containing the sources of the jars contained in {@link #getJarFiles}.
*
* <p>These should be used in place of {@link #getJarFiles()} if and only if source is required.
*/
diff --git a/src/main/java/com/google/devtools/build/lib/rules/nativedeps/NativeDepsHelper.java b/src/main/java/com/google/devtools/build/lib/rules/nativedeps/NativeDepsHelper.java
index 496ada0f09..d9381b243c 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/nativedeps/NativeDepsHelper.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/nativedeps/NativeDepsHelper.java
@@ -52,8 +52,9 @@ import java.util.Map;
*/
public abstract class NativeDepsHelper {
/**
- * An implementation of {@link CppLinkAction.LinkArtifactFactory} that can create artifacts
- * anywhere.
+ * An implementation of {@link
+ * com.google.devtools.build.lib.rules.cpp.CppLinkAction.LinkArtifactFactory} that can create
+ * artifacts anywhere.
*
* <p>Necessary because the actions of nativedeps libraries should be shareable, and thus cannot
* be under the package directory.
diff --git a/src/main/java/com/google/devtools/build/lib/rules/test/TestStrategy.java b/src/main/java/com/google/devtools/build/lib/rules/test/TestStrategy.java
index 813e9d45bd..47fc323fc9 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/test/TestStrategy.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/test/TestStrategy.java
@@ -24,7 +24,6 @@ import com.google.devtools.build.lib.actions.ActionExecutionContext;
import com.google.devtools.build.lib.actions.ExecException;
import com.google.devtools.build.lib.actions.Executor;
import com.google.devtools.build.lib.analysis.config.BinTools;
-import com.google.devtools.build.lib.analysis.config.BuildConfiguration;
import com.google.devtools.build.lib.events.Event;
import com.google.devtools.build.lib.exec.ExecutionOptions;
import com.google.devtools.build.lib.exec.SymlinkTreeHelper;
@@ -285,8 +284,7 @@ public abstract class TestStrategy implements TestActionContext {
* MUST NOT be used by any rule or action in such a way as to affect the semantics of that
* build step.
*/
- public Map<String, String> getAdmissibleShellEnvironment(BuildConfiguration config,
- Iterable<String> variables) {
+ public Map<String, String> getAdmissibleShellEnvironment(Iterable<String> variables) {
return getMapping(variables, clientEnv);
}
diff --git a/src/main/java/com/google/devtools/build/lib/shell/SimpleKillableObserver.java b/src/main/java/com/google/devtools/build/lib/shell/SimpleKillableObserver.java
index 85794b8387..8d7e2f017e 100644
--- a/src/main/java/com/google/devtools/build/lib/shell/SimpleKillableObserver.java
+++ b/src/main/java/com/google/devtools/build/lib/shell/SimpleKillableObserver.java
@@ -33,6 +33,7 @@ public final class SimpleKillableObserver implements KillableObserver {
*
* @param killable {@link Killable} to kill
*/
+ @Override
public synchronized void startObserving(final Killable killable) {
this.killable = killable;
}
@@ -41,6 +42,7 @@ public final class SimpleKillableObserver implements KillableObserver {
* Forgets reference to {@link Killable} provided to
* {@link #startObserving(Killable)}
*/
+ @Override
public synchronized void stopObserving(final Killable killable) {
if (!this.killable.equals(killable)) {
throw new IllegalStateException("start/stopObservering called with " +
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ASTFileLookupValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/ASTFileLookupValue.java
index c16d2a5969..65fa3f0a96 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/ASTFileLookupValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/ASTFileLookupValue.java
@@ -49,7 +49,7 @@ public class ASTFileLookupValue implements SkyValue {
return ast;
}
- static SkyKey key(PackageIdentifier astFileIdentifier) throws ASTLookupInputException {
+ static SkyKey key(PackageIdentifier astFileIdentifier) {
return new SkyKey(SkyFunctions.AST_FILE_LOOKUP, astFileIdentifier);
}
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java
index b565f1e900..77153f8969 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/ConfiguredTargetFunction.java
@@ -782,7 +782,7 @@ final class ConfiguredTargetFunction implements SkyFunction {
private ConfiguredTargetFunctionException(ConfiguredValueCreationException error) {
super(error, Transience.PERSISTENT);
- };
+ }
private ConfiguredTargetFunctionException(ActionConflictException e) {
super(e, Transience.PERSISTENT);
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java
index c8fad5061c..2c7b068131 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/PackageFunction.java
@@ -418,14 +418,8 @@ public class PackageFunction implements SkyFunction {
}
ASTFileLookupValue astLookupValue = null;
- SkyKey astLookupKey = null;
- try {
- astLookupKey = ASTFileLookupValue.key(
- PackageIdentifier.createInDefaultRepo(preludePath));
- } catch (ASTLookupInputException e) {
- // There's a static check ensuring that PRELUDE_FILE_FRAGMENT is relative.
- throw new IllegalStateException(e);
- }
+ SkyKey astLookupKey = ASTFileLookupValue.key(
+ PackageIdentifier.createInDefaultRepo(preludePath));
try {
astLookupValue = (ASTFileLookupValue) env.getValueOrThrow(astLookupKey,
ErrorReadingSkylarkExtensionException.class, InconsistentFilesystemException.class);
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java
index e94cfdbc23..93fe63d40e 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/PrecomputedValue.java
@@ -43,12 +43,12 @@ import javax.annotation.Nullable;
* "precomputed" from skyframe's perspective and so the graph needs to be prepopulated with them
* (e.g. via injection).
*/
-public class PrecomputedValue implements SkyValue {
+public final class PrecomputedValue implements SkyValue {
/**
* An externally-injected precomputed value. Exists so that modules can inject precomputed values
* into Skyframe's graph.
*
- * <p>{@see com.google.devtools.build.lib.blaze.BlazeModule#getPrecomputedValues}.
+ * @see com.google.devtools.build.lib.runtime.BlazeModule#getPrecomputedSkyframeValues
*/
public static final class Injected {
private final Precomputed<?> precomputed;
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/PrepareDepsOfPatternFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/PrepareDepsOfPatternFunction.java
index 32ba495f50..b3d0f4b2a8 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/PrepareDepsOfPatternFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/PrepareDepsOfPatternFunction.java
@@ -106,7 +106,8 @@ public class PrepareDepsOfPatternFunction implements SkyFunction {
}
/**
- * A {@link TargetPatternResolver} backed by an {@link Environment} whose methods do not actually
+ * A {@link TargetPatternResolver} backed by an {@link
+ * com.google.devtools.build.skyframe.SkyFunction.Environment} whose methods do not actually
* return resolved targets, but that ensures the graph loads the matching targets <b>and</b> their
* transitive dependencies. Its methods may throw {@link MissingDepException} if the package
* values this depends on haven't been calculated and added to its environment.
@@ -159,7 +160,7 @@ public class PrepareDepsOfPatternFunction implements SkyFunction {
@Override
public ResolvedTargets<Void> getTargetsInPackage(String originalPattern, String packageName,
- boolean rulesOnly) throws TargetParsingException, InterruptedException {
+ boolean rulesOnly) throws TargetParsingException {
FilteringPolicy policy =
rulesOnly ? FilteringPolicies.RULES_ONLY : FilteringPolicies.NO_FILTER;
return getTargetsInPackage(originalPattern, new PathFragment(packageName), policy);
@@ -167,7 +168,7 @@ public class PrepareDepsOfPatternFunction implements SkyFunction {
private ResolvedTargets<Void> getTargetsInPackage(String originalPattern,
PathFragment packageNameFragment, FilteringPolicy policy)
- throws TargetParsingException, InterruptedException {
+ throws TargetParsingException {
TargetPatternResolverUtil.validatePatternPackage(originalPattern, packageNameFragment, this);
try {
PackageIdentifier packageId = PackageIdentifier.createInDefaultRepo(packageNameFragment);
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/RecursiveDirectoryTraversalFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/RecursiveDirectoryTraversalFunction.java
index 41adc5e0ab..4f9fcab1c7 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/RecursiveDirectoryTraversalFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/RecursiveDirectoryTraversalFunction.java
@@ -60,18 +60,18 @@ abstract class RecursiveDirectoryTraversalFunction
/**
* Called by {@link #visitDirectory} to get the {@link SkyKey}s associated with recursive
- * computation in subdirectories of {@param subdirectory}, excluding directories in
- * {@param excludedSubdirectoriesBeneathSubdirectory}, all of which must be proper subdirectories
- * of {@param subdirectory}.
+ * computation in subdirectories of {@code subdirectory}, excluding directories in
+ * {@code excludedSubdirectoriesBeneathSubdirectory}, all of which must be proper subdirectories
+ * of {@code subdirectory}.
*/
protected abstract SkyKey getSkyKeyForSubdirectory(RootedPath subdirectory,
ImmutableSet<PathFragment> excludedSubdirectoriesBeneathSubdirectory);
/**
* Called by {@link #visitDirectory} to compute the {@code TReturn} value it returns, as a
- * function of {@param visitor} and the {@link SkyValue}s computed for subdirectories
+ * function of {@code visitor} and the {@link SkyValue}s computed for subdirectories
* of the directory specified by {@code recursivePkgKey}, contained in
- * {@param subdirectorySkyValues}.
+ * {@code subdirectorySkyValues}.
*/
protected abstract TReturn aggregateWithSubdirectorySkyValues(
TVisitor visitor, Map<SkyKey, SkyValue> subdirectorySkyValues);
@@ -87,7 +87,7 @@ abstract class RecursiveDirectoryTraversalFunction
interface Visitor {
/**
- * Called iff the directory contains a package. Provides an {@link Environment} {@param env}
+ * Called iff the directory contains a package. Provides an {@link Environment} {@code env}
* so that the visitor may do additional lookups. {@link Environment#valuesMissing} will be
* checked afterwards.
*/
@@ -95,7 +95,7 @@ abstract class RecursiveDirectoryTraversalFunction
}
/**
- * Looks in the directory specified by {@param recursivePkgKey} for a package, does some work
+ * Looks in the directory specified by {@code recursivePkgKey} for a package, does some work
* as specified by {@link Visitor} if such a package exists, then recursively does work in each
* non-excluded subdirectory as specified by {@link #getSkyKeyForSubdirectory}, and finally
* aggregates the {@link Visitor} value along with values from each subdirectory as specified
@@ -103,7 +103,7 @@ abstract class RecursiveDirectoryTraversalFunction
*
* <p>Returns null if {@code env.valuesMissing()} is true, checked after each call to one of
* {@link RecursiveDirectoryTraversalFunction}'s abstract methods except for {@link
- * #getEmptyReturn}. (And after each of {@code visitDirectory}'s own uses of {@param env}, of
+ * #getEmptyReturn}. (And after each of {@code visitDirectory}'s own uses of {@code env}, of
* course.)
*/
TReturn visitDirectory(RecursivePkgKey recursivePkgKey, Environment env) {
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java
index bc3d6b6551..cc54e4c2af 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkyframeExecutor.java
@@ -558,7 +558,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
PrecomputedValue.TOP_LEVEL_CONTEXT.set(injectable(), options);
}
- public void injectWorkspaceStatusData(BuildConfigurationCollection configurations) {
+ public void injectWorkspaceStatusData() {
PrecomputedValue.WORKSPACE_STATUS_KEY.set(injectable(),
workspaceStatusActionFactory.createWorkspaceStatusAction(
artifactFactory.get(), WorkspaceStatusValue.ARTIFACT_OWNER, buildId));
@@ -1271,7 +1271,7 @@ public abstract class SkyframeExecutor implements WalkableGraphFactory {
Label label, BuildConfiguration configuration) {
if (memoizingEvaluator.getExistingValueForTesting(
PrecomputedValue.WORKSPACE_STATUS_KEY.getKeyForTesting()) == null) {
- injectWorkspaceStatusData(null);
+ injectWorkspaceStatusData();
}
return Iterables.getFirst(
getConfiguredTargets(configuration, ImmutableList.of(new Dependency(label, configuration)),
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkylarkImportLookupFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkylarkImportLookupFunction.java
index 5096ba8d2e..0bd16ae90a 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/SkylarkImportLookupFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkylarkImportLookupFunction.java
@@ -67,8 +67,6 @@ public class SkylarkImportLookupFunction implements SkyFunction {
file, e.getMessage()));
} catch (InconsistentFilesystemException e) {
throw new SkylarkImportLookupFunctionException(e, Transience.PERSISTENT);
- } catch (ASTLookupInputException e) {
- throw new SkylarkImportLookupFunctionException(e, Transience.PERSISTENT);
}
if (astLookupValue == null) {
return null;
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/SkylarkModuleCycleReporter.java b/src/main/java/com/google/devtools/build/lib/skyframe/SkylarkModuleCycleReporter.java
index 5cbf672db2..5043879c80 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/SkylarkModuleCycleReporter.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/SkylarkModuleCycleReporter.java
@@ -51,7 +51,7 @@ public class SkylarkModuleCycleReporter implements CyclesReporter.SingleCycleRep
&& IS_PACKAGE_SKY_KEY.apply(lastPathElement)) {
StringBuilder cycleMessage =
new StringBuilder()
- .append(((PackageIdentifier) lastPathElement.argument()) + "/BUILD: ")
+ .append(lastPathElement.argument()).append("/BUILD: ")
.append("cycle in referenced extension files: ");
AbstractLabelCycleReporter.printCycle(cycleInfo.getCycle(), cycleMessage,
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTargetFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTargetFunction.java
index 52f128fbe1..ab47e4f86c 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTargetFunction.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTargetFunction.java
@@ -145,7 +145,7 @@ public class TransitiveTargetFunction
for (Class<?> fragment : configFragments) {
if (!builder.getConfigFragmentsFromDeps().contains(fragment)) {
builder.getTransitiveConfigFragments().add(
- (Class<? extends BuildConfiguration.Fragment>) fragment);
+ fragment.asSubclass(BuildConfiguration.Fragment.class));
}
}
}
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTargetValue.java b/src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTargetValue.java
index 9c8a95d5fe..b93d7deca7 100644
--- a/src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTargetValue.java
+++ b/src/main/java/com/google/devtools/build/lib/skyframe/TransitiveTargetValue.java
@@ -145,9 +145,10 @@ public class TransitiveTargetValue implements SkyValue {
}
/**
- * Returns the set of {@link BuildConfiguration.Fragment} classes required to configure a
- * rule's transitive closure. These are used to instantiate the right
- * {@link ConfigurationFragmentValue} instances for a rule's {@link BuildConfigurationValue}.
+ * Returns the set of {@link
+ * com.google.devtools.build.lib.analysis.config.BuildConfiguration.Fragment} classes required to
+ * configure a rule's transitive closure. These are used to instantiate the right {@link
+ * ConfigurationFragmentValue} instances for a rule's {@link BuildConfigurationValue}.
*
* <p>This provides the basis for rule-scoped configurations. For example, Java-related build
* flags have nothing to do with C++. So changing a Java flag shouldn't invalidate a C++ rule
@@ -161,7 +162,7 @@ public class TransitiveTargetValue implements SkyValue {
* from them to feed the rule's configured target. This provides the first step.
*
* <p>See
- * {@link com.google.devtools.build.lib.packages.RuleClass.Builder#requiredConfigurationFragments}
+ * {@link com.google.devtools.build.lib.packages.RuleClass.Builder#requiresConfigurationFragments}
*/
NestedSet<Class<? extends BuildConfiguration.Fragment>> getTransitiveConfigFragments() {
return transitiveConfigFragments;