ChangeUpdate: Replace lambdas with method references

Change-Id: Ib5fb7c8437bfddf0fbf0eaa4c1d4a4b0077fa7bd
This commit is contained in:
David Pursehouse
2020-06-25 15:21:14 +09:00
parent a1b9849606
commit 923a3dad58

View File

@@ -401,7 +401,7 @@ public class ChangeUpdate extends AbstractChangeUpdate {
Set<Account.Id> currentAccountUpdates =
plannedAttentionSetUpdates.values().stream()
.map(u -> u.account())
.map(AttentionSetUpdate::account)
.collect(Collectors.toSet());
updates.stream()
.filter(u -> !currentAccountUpdates.contains(u.account()))
@@ -754,7 +754,7 @@ public class ChangeUpdate extends AbstractChangeUpdate {
a ->
AttentionSetUpdate.createForWrite(
a.account(), AttentionSetUpdate.Operation.REMOVE, reason))
.forEach(a -> addToPlannedAttentionSetUpdates(a));
.forEach(this::addToPlannedAttentionSetUpdates);
}
private void applyReviewerUpdatesToAttentionSet() {
@@ -791,7 +791,7 @@ public class ChangeUpdate extends AbstractChangeUpdate {
r ->
AttentionSetUpdate.createForWrite(
r, AttentionSetUpdate.Operation.ADD, "Change was marked ready for review"))
.forEach(a -> addToPlannedAttentionSetUpdates(a));
.forEach(this::addToPlannedAttentionSetUpdates);
}
/**