diff options
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/android')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/android/AndroidBinary.java | 4 | ||||
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/android/AndroidResourcesProvider.java | 2 |
2 files changed, 4 insertions, 2 deletions
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 79260c980f..0e552a6d96 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 @@ -13,6 +13,8 @@ // limitations under the License. package com.google.devtools.build.lib.rules.android; +import static com.google.common.base.Strings.isNullOrEmpty; + import com.google.common.annotations.VisibleForTesting; import com.google.common.base.Joiner; import com.google.common.base.Optional; @@ -664,7 +666,7 @@ public abstract class AndroidBinary implements RuleConfiguredTargetFactory { private static String getExpandedMakeVarsForAttr(RuleContext context, String attr) { final String value = context.attributes().get(attr, Type.STRING); - if (value == null || value.isEmpty()) { + if (isNullOrEmpty(value)) { return null; } return context.expandMakeVariables(attr, value); diff --git a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidResourcesProvider.java b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidResourcesProvider.java index e3f8f23bd0..520e4c9420 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/android/AndroidResourcesProvider.java +++ b/src/main/java/com/google/devtools/build/lib/rules/android/AndroidResourcesProvider.java @@ -184,7 +184,7 @@ public final class AndroidResourcesProvider implements TransitiveInfoProvider { @Override public int hashCode() { - return Objects.hash(label); + return Objects.hashCode(label); } @Override |