-
Notifications
You must be signed in to change notification settings - Fork 625
Only iterate across active targets in WatchChangeAggregator #1422
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Coverage ReportAffected SDKs
Test Logs
NotesHTML coverage reports can be produced locally with./gradlew <product>:checkCoverage . Report files are located at <product-build-dir>/reports/jacoco/ .
|
Binary Size ReportAffected SDKs
Test Logs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with a nit
@@ -162,7 +163,13 @@ public void handleTargetChange(WatchTargetChange targetChange) { | |||
if (!targetIds.isEmpty()) { | |||
return targetIds; | |||
} else { | |||
return targetStates.keySet(); | |||
List<Integer> activeIds = new ArrayList<>(); | |||
for (int id : targetStates.keySet()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
targetStates
is a HashMap
with Integer
keys. By iterating on this with an int
variable you're unboxing and then re-boxing to add to activeIds
. This should be for (Integer id : ...)
.
This whole file is sloppy about this but let's not make the problem any worse.
Porting from web.