aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools
diff options
context:
space:
mode:
authorGravatar cushon <cushon@google.com>2018-04-27 01:25:50 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-04-27 01:27:08 -0700
commit8c6b7abac3072314a5707cfdf8a942cf050a2ce7 (patch)
treeedb50541f6a1b44c8588e761e40e86d8756e7363 /src/main/java/com/google/devtools
parent5a9cf986c76667c7d67ea65f28f274c3df41feb3 (diff)
Normalize parameter name comments
PiperOrigin-RevId: 194512971
Diffstat (limited to 'src/main/java/com/google/devtools')
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/ConfiguredAspect.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/actions/CustomCommandLine.java6
-rw-r--r--src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkActionFactory.java24
-rw-r--r--src/main/java/com/google/devtools/build/lib/bazel/rules/android/ndkcrosstools/NdkRelease.java6
-rw-r--r--src/main/java/com/google/devtools/build/lib/packages/Rule.java4
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java11
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibrary.java10
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/AndroidLocalTestBase.java8
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/android/ManifestMergerActionBuilder.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java3
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/cpp/proto/CcProtoAspect.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/java/JavaBinary.java12
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java4
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoAspect.java5
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoSkylarkCommon.java2
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/proto/BazelProtoLibrary.java4
-rw-r--r--src/main/java/com/google/devtools/build/lib/rules/proto/ProtoCompileActionBuilder.java6
-rw-r--r--src/main/java/com/google/devtools/build/lib/vfs/PathFragment.java4
18 files changed, 61 insertions, 54 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/ConfiguredAspect.java b/src/main/java/com/google/devtools/build/lib/analysis/ConfiguredAspect.java
index c373257370..a33e6fefd5 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/ConfiguredAspect.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/ConfiguredAspect.java
@@ -247,7 +247,7 @@ public final class ConfiguredAspect {
addProvider(
createExtraActionProvider(
- ImmutableSet.<ActionAnalysisMetadata>of() /* actionsWithoutExtraAction */,
+ /* actionsWithoutExtraAction= */ ImmutableSet.<ActionAnalysisMetadata>of(),
ruleContext));
return new ConfiguredAspect(descriptor, providers.build());
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/actions/CustomCommandLine.java b/src/main/java/com/google/devtools/build/lib/analysis/actions/CustomCommandLine.java
index 6f04a0eb6f..770d16aef7 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/actions/CustomCommandLine.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/actions/CustomCommandLine.java
@@ -174,7 +174,7 @@ public final class CustomCommandLine extends CommandLine {
private SimpleVectorArg(Builder builder, @Nullable Collection<T> values) {
this(
- false /* isNestedSet */,
+ /* isNestedSet= */ false,
values == null || values.isEmpty(),
values != null ? values.size() : 0,
builder.formatEach,
@@ -185,9 +185,9 @@ public final class CustomCommandLine extends CommandLine {
private SimpleVectorArg(Builder builder, @Nullable NestedSet<T> values) {
this(
- true /* isNestedSet */,
+ /* isNestedSet= */ true,
values == null || values.isEmpty(),
- -1 /* count */,
+ /* count= */ -1,
builder.formatEach,
builder.beforeEach,
builder.joinWith,
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkActionFactory.java b/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkActionFactory.java
index 0985afb108..731ccf1cbe 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkActionFactory.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/skylark/SkylarkActionFactory.java
@@ -1134,16 +1134,16 @@ public class SkylarkActionFactory implements SkylarkValue {
}
addVectorArg(
value,
- null /* argName */,
+ /* argName= */ null,
mapFn != Runtime.NONE ? (BaseFunction) mapFn : null,
- null /* mapEach */,
+ /* mapEach= */ null,
format != Runtime.NONE ? (String) format : null,
beforeEach != Runtime.NONE ? (String) beforeEach : null,
joinWith != Runtime.NONE ? (String) joinWith : null,
- null /* formatJoined */,
- false /* omitIfEmpty */,
- false /* uniquify */,
- null /* terminateWith */,
+ /* formatJoined= */ null,
+ /* omitIfEmpty= */ false,
+ /* uniquify= */ false,
+ /* terminateWith= */ null,
loc);
} else {
@@ -1337,12 +1337,12 @@ public class SkylarkActionFactory implements SkylarkValue {
addVectorArg(
values,
argName,
- null /* mapAll */,
+ /* mapAll= */ null,
mapEach != Runtime.NONE ? (BaseFunction) mapEach : null,
formatEach != Runtime.NONE ? (String) formatEach : null,
beforeEach != Runtime.NONE ? (String) beforeEach : null,
- null /* joinWith */,
- null /* formatJoined */,
+ /* joinWith= */ null,
+ /* formatJoined= */ null,
omitIfEmpty,
uniquify,
terminateWith != Runtime.NONE ? (String) terminateWith : null,
@@ -1481,15 +1481,15 @@ public class SkylarkActionFactory implements SkylarkValue {
addVectorArg(
values,
argName,
- null /* mapAll */,
+ /* mapAll= */ null,
mapEach != Runtime.NONE ? (BaseFunction) mapEach : null,
formatEach != Runtime.NONE ? (String) formatEach : null,
- null /* beforeEach */,
+ /* beforeEach= */ null,
joinWith,
formatJoined != Runtime.NONE ? (String) formatJoined : null,
omitIfEmpty,
uniquify,
- null /* terminateWith */,
+ /* terminateWith= */ null,
loc);
return Runtime.NONE;
}
diff --git a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/ndkcrosstools/NdkRelease.java b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/ndkcrosstools/NdkRelease.java
index 7b393ce166..9c475d13aa 100644
--- a/src/main/java/com/google/devtools/build/lib/bazel/rules/android/ndkcrosstools/NdkRelease.java
+++ b/src/main/java/com/google/devtools/build/lib/bazel/rules/android/ndkcrosstools/NdkRelease.java
@@ -59,7 +59,7 @@ public class NdkRelease {
} else {
return new NdkRelease(
revision, // raw revision
- true, // isValid
+ /* isValid= */ true,
Integer.parseInt(revisionParsed[0]), // major revision
revisionParsed[1], // minor revision
null, // release candidate
@@ -90,8 +90,8 @@ public class NdkRelease {
isValid,
Integer.parseInt(matcher.group("Mrev")), /* major revision */
matcher.group("mrev"), /* minor revision */
- matcher.group("rc"), /* releaseCandidate */
- matcher.group("s4") != null /* is64Bit */);
+ /* releaseCandidate= */ matcher.group("rc"),
+ /* is64Bit= */ matcher.group("s4") != null);
} else {
return new NdkRelease(
revisionString,
diff --git a/src/main/java/com/google/devtools/build/lib/packages/Rule.java b/src/main/java/com/google/devtools/build/lib/packages/Rule.java
index 6615fe633f..027d292b41 100644
--- a/src/main/java/com/google/devtools/build/lib/packages/Rule.java
+++ b/src/main/java/com/google/devtools/build/lib/packages/Rule.java
@@ -353,7 +353,7 @@ public final class Rule implements Target, DependencyFilter.AttributeInfoProvide
* <p>This method ignores whether the present rule was created by a macro or not.
*/
public Location getAttributeLocationWithoutMacro(String attrName) {
- return getAttributeLocation(attrName, false /* useBuildLocation */);
+ return getAttributeLocation(attrName, /* useBuildLocation= */ false);
}
/**
@@ -365,7 +365,7 @@ public final class Rule implements Target, DependencyFilter.AttributeInfoProvide
* location of the macro invocation in the BUILD file instead.
*/
public Location getAttributeLocation(String attrName) {
- return getAttributeLocation(attrName, true /* useBuildLocation */);
+ return getAttributeLocation(attrName, /* useBuildLocation= */ true);
}
private Location getAttributeLocation(String attrName, boolean useBuildLocation) {
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java
index 650027ffd8..3f246766a0 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java
@@ -257,10 +257,10 @@ public abstract class AndroidBinary implements RuleConfiguredTargetFactory {
androidSemantics,
resourceApk,
ruleContext.getConfiguration().isCodeCoverageEnabled(),
- true /* collectJavaCompilationArgs */,
- true, /* isBinary */
+ /* collectJavaCompilationArgs= */ true,
+ /* isBinary= */ true,
excludedRuntimeArtifacts,
- true /* generateExtensionRegistry */);
+ /* generateExtensionRegistry= */ true);
ruleContext.assertNoErrors();
Function<Artifact, Artifact> derivedJarFunction =
@@ -558,13 +558,12 @@ public abstract class AndroidBinary implements RuleConfiguredTargetFactory {
androidCommon.addTransitiveInfoProviders(
builder,
- null /* aar */,
+ /* aar= */ null,
resourceApk,
zipAlignedApk,
apksUnderTest,
nativeLibs,
- androidCommon.isNeverLink()
- );
+ androidCommon.isNeverLink());
if (dexPostprocessingOutput.proguardMap() != null) {
builder.addProvider(
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibrary.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibrary.java
index f94a3811ae..fffda808d9 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibrary.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLibrary.java
@@ -195,11 +195,11 @@ public abstract class AndroidLibrary implements RuleConfiguredTargetFactory {
javaSemantics,
androidSemantics,
resourceApk,
- false /* addCoverageSupport */,
- true /* collectJavaCompilationArgs */,
- false /* isBinary */,
- null /* excludedRuntimeArtifacts */,
- false /* generateExtensionRegistry */);
+ /* addCoverageSupport= */ false,
+ /* collectJavaCompilationArgs= */ true,
+ /* isBinary= */ false,
+ /* excludedRuntimeArtifacts= */ null,
+ /* generateExtensionRegistry= */ false);
if (javaTargetAttributes == null) {
return null;
}
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLocalTestBase.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLocalTestBase.java
index 76d5ff660e..f5527ba934 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLocalTestBase.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidLocalTestBase.java
@@ -102,7 +102,7 @@ public abstract class AndroidLocalTestBase implements RuleConfiguredTargetFactor
} else {
// Create the final merged manifest
ResourceDependencies resourceDependencies =
- ResourceDependencies.fromRuleDeps(ruleContext, false /* neverlink */);
+ ResourceDependencies.fromRuleDeps(ruleContext, /* neverlink= */ false);
ApplicationManifest applicationManifest =
getApplicationManifest(ruleContext, androidSemantics, resourceDependencies);
@@ -119,8 +119,8 @@ public abstract class AndroidLocalTestBase implements RuleConfiguredTargetFactor
ImmutableList.of(), /* list of uncompressed extensions */
false, /* crunch png */
ProguardHelper.getProguardConfigArtifact(ruleContext, ""),
- null, /* mainDexProguardCfg */
- false, /* conditionalKeepRules */
+ /* mainDexProguardCfg= */ null,
+ /* conditionalKeepRules= */ false,
ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_PROCESSED_MANIFEST),
ruleContext.getImplicitOutputArtifact(AndroidRuleClasses.ANDROID_RESOURCES_ZIP),
DataBinding.isEnabled(ruleContext)
@@ -168,7 +168,7 @@ public abstract class AndroidLocalTestBase implements RuleConfiguredTargetFactor
propertiesFile,
template,
substitutions,
- false /* makeExecutable */));
+ /* makeExecutable= */ false));
// Add the properties file to the test jar as a java resource
attributesBuilder.addResource(
PathFragment.create("com/android/tools/test_config.properties"), propertiesFile);
diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/ManifestMergerActionBuilder.java b/src/main/java/com/google/devtools/build/lib/rules/android/ManifestMergerActionBuilder.java
index adff649444..41d27443a2 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/android/ManifestMergerActionBuilder.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/android/ManifestMergerActionBuilder.java
@@ -108,7 +108,7 @@ public class ManifestMergerActionBuilder {
builder.add(
"--mergeeManifests",
mapToDictionaryString(
- mergeeManifests, Artifact::getExecPathString, null /* valueConverter */));
+ mergeeManifests, Artifact::getExecPathString, /* valueConverter= */ null));
inputs.addAll(mergeeManifests.keySet());
}
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java
index 19bd3a7ddd..6662968cb3 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CppLinkActionBuilder.java
@@ -1065,7 +1065,8 @@ public class CppLinkActionBuilder {
} else {
List<String> opts = new ArrayList<>(linkopts);
opts.addAll(
- featureConfiguration.getCommandLine("lto-indexing", buildVariables, null /* expander */));
+ featureConfiguration.getCommandLine(
+ "lto-indexing", buildVariables, /* expander= */ null));
opts.addAll(cppConfiguration.getLtoIndexOptions());
linkoptsForVariables = ImmutableList.copyOf(opts);
}
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/proto/CcProtoAspect.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/proto/CcProtoAspect.java
index 2abecee223..b1b466e2ec 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/cpp/proto/CcProtoAspect.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/proto/CcProtoAspect.java
@@ -347,7 +347,7 @@ public abstract class CcProtoAspect extends NativeAspectClass implements Configu
ruleContext.getLabel(),
outputs,
"C++",
- true /* allowServices */);
+ /* allowServices= */ true);
}
private ProtoLangToolchainProvider getProtoToolchainProvider() {
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaBinary.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaBinary.java
index b3b8ed1bf8..f50bc03944 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaBinary.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaBinary.java
@@ -147,9 +147,15 @@ public class JavaBinary implements RuleConfiguredTargetFactory {
Artifact unstrippedLauncher = null;
if (stripAsDefault) {
unstrippedDeployArchiveBuilder = new DeployArchiveBuilder(semantics, ruleContext);
- unstrippedLauncher = semantics.getLauncher(ruleContext, common,
- unstrippedDeployArchiveBuilder, runfilesBuilder, jvmFlags, attributesBuilder,
- false /* shouldStrip */);
+ unstrippedLauncher =
+ semantics.getLauncher(
+ ruleContext,
+ common,
+ unstrippedDeployArchiveBuilder,
+ runfilesBuilder,
+ jvmFlags,
+ attributesBuilder,
+ /* shouldStrip= */ false);
}
JavaCompilationArtifacts.Builder javaArtifactsBuilder = new JavaCompilationArtifacts.Builder();
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java
index b60cb2c30e..71c198d73c 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompileAction.java
@@ -217,8 +217,8 @@ public final class JavaCompileAction extends SpawnAction {
progressMessage,
runfilesSupplier,
"Javac",
- false /*executeUnconditionally*/,
- null /*extraActionInfoSupplier*/);
+ /* executeUnconditionally= */ false,
+ /* extraActionInfoSupplier= */ null);
this.javaCompileCommandLine = javaCompileCommandLine;
this.commandLine = commandLine;
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoAspect.java b/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoAspect.java
index 31f7d9e84a..f531e0f700 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoAspect.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaLiteProtoAspect.java
@@ -240,7 +240,8 @@ public class JavaLiteProtoAspect extends NativeAspectClass implements Configured
ruleContext,
ImmutableList.of(
new ProtoCompileActionBuilder.ToolchainInvocation(
- "javalite", aspectCommon.getProtoToolchainProvider(),
+ "javalite",
+ aspectCommon.getProtoToolchainProvider(),
sourceJar.getExecPathString())),
supportData.getDirectProtoSources(),
supportData.getTransitiveImports(),
@@ -249,7 +250,7 @@ public class JavaLiteProtoAspect extends NativeAspectClass implements Configured
ruleContext.getLabel(),
ImmutableList.of(sourceJar),
"JavaLite",
- true /* allowServices */);
+ /* allowServices= */ true);
}
}
}
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoSkylarkCommon.java b/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoSkylarkCommon.java
index e74d5a005f..6ec3fcfd0a 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoSkylarkCommon.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/java/proto/JavaProtoSkylarkCommon.java
@@ -88,7 +88,7 @@ public class JavaProtoSkylarkCommon {
skylarkRuleContext.getLabel(),
ImmutableList.of(sourceJar),
"JavaLite",
- true /* allowServices */);
+ /* allowServices= */ true);
}
@SkylarkCallable(
diff --git a/src/main/java/com/google/devtools/build/lib/rules/proto/BazelProtoLibrary.java b/src/main/java/com/google/devtools/build/lib/rules/proto/BazelProtoLibrary.java
index 384384250a..e3687be773 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/proto/BazelProtoLibrary.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/proto/BazelProtoLibrary.java
@@ -51,7 +51,7 @@ public class BazelProtoLibrary implements RuleConfiguredTargetFactory {
final SupportData supportData =
SupportData.create(
- Predicates.<TransitiveInfoCollection>alwaysTrue() /* nonWeakDepsPredicate */,
+ /* nonWeakDepsPredicate= */ Predicates.<TransitiveInfoCollection>alwaysTrue(),
protoSources,
protosInDirectDeps,
transitiveImports,
@@ -73,7 +73,7 @@ public class BazelProtoLibrary implements RuleConfiguredTargetFactory {
transitiveImports,
protosInDirectDeps,
descriptorSetOutput,
- true /* allowServices */,
+ /* allowServices= */ true,
dependenciesDescriptorSets,
protoPathFlags);
diff --git a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoCompileActionBuilder.java b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoCompileActionBuilder.java
index 7eb1e2e324..808c2a309a 100644
--- a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoCompileActionBuilder.java
+++ b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoCompileActionBuilder.java
@@ -369,9 +369,9 @@ public class ProtoCompileActionBuilder {
// A rule that concatenates the artifacts from ctx.deps.proto.transitive_descriptor_sets
// provides similar results.
"--descriptor_set_out=$(OUT)",
- null /* pluginExecutable */,
- null /* runtime */,
- NestedSetBuilder.<Artifact>emptySet(STABLE_ORDER) /* blacklistedProtos */),
+ /* pluginExecutable= */ null,
+ /* runtime= */ null,
+ /* blacklistedProtos= */ NestedSetBuilder.<Artifact>emptySet(STABLE_ORDER)),
outReplacement);
}
diff --git a/src/main/java/com/google/devtools/build/lib/vfs/PathFragment.java b/src/main/java/com/google/devtools/build/lib/vfs/PathFragment.java
index fcb857bf20..8c9009fab4 100644
--- a/src/main/java/com/google/devtools/build/lib/vfs/PathFragment.java
+++ b/src/main/java/com/google/devtools/build/lib/vfs/PathFragment.java
@@ -620,7 +620,7 @@ public final class PathFragment
* these are always normalized and will throw uplevel references away.
*/
public static boolean isNormalized(String path) {
- return isNormalizedImpl(path, true /* lookForSameLevelReferences */);
+ return isNormalizedImpl(path, /* lookForSameLevelReferences= */ true);
}
/**
@@ -630,7 +630,7 @@ public final class PathFragment
* these are always normalized and will throw uplevel references away.
*/
public static boolean containsUplevelReferences(String path) {
- return !isNormalizedImpl(path, false /* lookForSameLevelReferences */);
+ return !isNormalizedImpl(path, /* lookForSameLevelReferences= */ false);
}
private enum NormalizedImplState {