Skip to content

Commit

Permalink
Remove addAll for always-empty set.
Browse files Browse the repository at this point in the history
If exceptionInducingTargets isn't empty, an error would have been thrown and we wouldn't have reached this return line anyway.

PiperOrigin-RevId: 444569174
  • Loading branch information
joeleba authored and copybara-github committed Apr 26, 2022
1 parent 91f8421 commit b50cbd5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ public Set<ConfiguredTarget> checkTargetEnvironmentRestrictions(
.setAnalysis(Analysis.newBuilder().setCode(Code.TARGETS_MISSING_ENVIRONMENTS))
.build());
}
return ImmutableSet.copyOf(badTargets.addAll(exceptionInducingTargets.keySet()).build());
return badTargets.build();
}

/**
Expand Down

0 comments on commit b50cbd5

Please sign in to comment.