Simplify Attribute builder now that all rules specify allowed file types.
--
MOS_MIGRATED_REVID=88436595
diff --git a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
index 0de3117..dc6f2da 100644
--- a/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
+++ b/src/main/java/com/google/devtools/build/lib/analysis/RuleContext.java
@@ -1397,6 +1397,10 @@
return;
}
FileTypeSet allowedFileTypes = attribute.getAllowedFileTypesPredicate();
+ if (allowedFileTypes == null) {
+ // It's not a label or label_list attribute.
+ return;
+ }
if (allowedFileTypes == FileTypeSet.ANY_FILE && !attribute.isNonEmpty()
&& !attribute.isSingleArtifact()) {
return;