Skip to content

Commit

Permalink
Use memoizedFlattenAndGetSize instead of toList.size to get a NestedS…
Browse files Browse the repository at this point in the history
…et's size.

PiperOrigin-RevId: 505705087
Change-Id: I7987e4f23706272f4ab10dcf51740182192d6d97
  • Loading branch information
joeleba authored and copybara-github committed Jan 30, 2023
1 parent 7f157ab commit 6fe6a95
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public ConfiguredTarget build() throws ActionConflictException, InterruptedExcep

if (ruleContext.getRule().hasAnalysisTestTransition()) {
NestedSet<Label> labels = transitiveLabels();
int depCount = labels.toList().size();
int depCount = labels.memoizedFlattenAndGetSize();
if (depCount > ruleContext.getConfiguration().analysisTestingDepsLimit()) {
ruleContext.ruleError(
String.format(
Expand Down

0 comments on commit 6fe6a95

Please sign in to comment.