From 4acb36c048a620abd7a0f5dff274851bd6dd9c28 Mon Sep 17 00:00:00 2001 From: ccalvarin Date: Thu, 21 Sep 2017 00:35:35 +0200 Subject: 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 --- .../devtools/build/lib/runtime/AllIncompatibleChangesExpansion.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/main/java/com/google/devtools/build/lib') 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)) { -- cgit v1.2.3