diff options
author | 2017-01-03 12:01:28 +0000 | |
---|---|---|
committer | 2017-01-03 15:05:10 +0000 | |
commit | 71e37222e3f61cf670b62373a59b87692da1d1c9 (patch) | |
tree | 5610e6fbe2980579f535a400d30a04fe69d4b7c7 /src/main/java/com/google/devtools/build/lib | |
parent | 5735d9be6b960ce0526927990280baeca7bbcfdb (diff) |
Cleanup initialization of expandIfTrue/False in CcToolchainFeatures.FlagGroup constructor
--
PiperOrigin-RevId: 143429631
MOS_MIGRATED_REVID=143429631
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainFeatures.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainFeatures.java b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainFeatures.java index 23c46e41b2..2c3a139b7c 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainFeatures.java +++ b/src/main/java/com/google/devtools/build/lib/rules/cpp/CcToolchainFeatures.java @@ -18,6 +18,7 @@ import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Optional; import com.google.common.base.Preconditions; import com.google.common.base.Predicate; +import com.google.common.base.Strings; import com.google.common.cache.CacheBuilder; import com.google.common.cache.CacheLoader; import com.google.common.cache.LoadingCache; @@ -377,8 +378,8 @@ public class CcToolchainFeatures implements Serializable { this.usedVariables = usedVariables.build(); this.expandables = expandables.build(); this.expandIfAllAvailable = ImmutableSet.copyOf(flagGroup.getExpandIfAllAvailableList()); - this.expandIfTrue = flagGroup.getExpandIfTrue(); - this.expandIfFalse = flagGroup.getExpandIfFalse(); + this.expandIfTrue = Strings.emptyToNull(flagGroup.getExpandIfTrue()); + this.expandIfFalse = Strings.emptyToNull(flagGroup.getExpandIfFalse()); } @Override |