aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/runtime/AllIncompatibleChangesExpansion.java
diff options
context:
space:
mode:
authorGravatar ccalvarin <ccalvarin@google.com>2017-09-21 00:35:35 +0200
committerGravatar László Csomor <laszlocsomor@google.com>2017-09-21 11:04:27 +0200
commit4acb36c048a620abd7a0f5dff274851bd6dd9c28 (patch)
treeab02731947235a5abc881c94a86caaead7830a77 /src/main/java/com/google/devtools/build/lib/runtime/AllIncompatibleChangesExpansion.java
parent0e7051a55ab0396feeea7b6f9750594a02ef9c34 (diff)
Cleanup of expansion option naming
Options that expand to other options are expansion options and the options they expand to have values that were expansions. This can be a bit confusing. Removes the isExpansion() call that is somewhat ambiguous, and forces option users to explicitly check the option definition for this information. Also provide a parallel boolean function for implicit requirements, so that we stop querying for the length of the implicit requirement all over the place. RELNOTES: None. PiperOrigin-RevId: 169461566
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/runtime/AllIncompatibleChangesExpansion.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/runtime/AllIncompatibleChangesExpansion.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/runtime/AllIncompatibleChangesExpansion.java b/src/main/java/com/google/devtools/build/lib/runtime/AllIncompatibleChangesExpansion.java
index 849e18cc92..cf81b22c6d 100644
--- a/src/main/java/com/google/devtools/build/lib/runtime/AllIncompatibleChangesExpansion.java
+++ b/src/main/java/com/google/devtools/build/lib/runtime/AllIncompatibleChangesExpansion.java
@@ -116,7 +116,7 @@ public class AllIncompatibleChangesExpansion implements ExpansionFunction {
if (optionDefinition.allowsMultiple()) {
throw new IllegalArgumentException(prefix + "must not use the allowMultiple field");
}
- if (optionDefinition.getImplicitRequirements().length > 0) {
+ if (optionDefinition.hasImplicitRequirements()) {
throw new IllegalArgumentException(prefix + "must not use the implicitRequirements field");
}
if (!optionDefinition.getOldOptionName().equals(defaultString)) {