Skip to content

Commit

Permalink
Add java_import_empty_jars allowlist to native implementation of Java…
Browse files Browse the repository at this point in the history
…Import

PiperOrigin-RevId: 480538536
Change-Id: Iee05e42333f3ead0c8e6d7acc2fb5ed9975ecbd1
  • Loading branch information
kotlaja authored and copybara-github committed Oct 12, 2022
1 parent 7866fd9 commit 67d3bca
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,11 @@ private static boolean exportError(RuleContext ruleContext) {

private static void checkJarsAttributeEmpty(RuleContext ruleContext) {
if (ruleContext.getPrerequisites("jars").isEmpty()
&& ruleContext.getFragment(JavaConfiguration.class).disallowJavaImportEmptyJars()) {
ruleContext.ruleError("empty java_import.jars is no longer supported");
&& ruleContext.getFragment(JavaConfiguration.class).disallowJavaImportEmptyJars()
&& Allowlist.hasAllowlist(ruleContext, "java_import_empty_jars")
&& !Allowlist.isAvailable(ruleContext, "java_import_empty_jars")) {
ruleContext.ruleError(
"empty java_import.jars is no longer supported " + ruleContext.getLabel());
}
}

Expand Down

0 comments on commit 67d3bca

Please sign in to comment.