VoteDeletedListener: Remove getRemoved() method from Event interface
The method is not being called, and the implementation in VoteDeleted doesn't even work as intended (always returns an empty map). Furthermore, the method would most likely not be useful for consumers of the event anyway, since they still need to fetch the old and new approvals maps to correctly build the old/new values mapping; see for example how these are used in the ReviewerDeleted event. Change-Id: I008a2d12b5a5c53cb56c13affd9ea76c42103472
This commit is contained in:
@@ -26,8 +26,6 @@ public interface VoteDeletedListener {
|
||||
|
||||
Map<String, ApprovalInfo> getApprovals();
|
||||
|
||||
Map<String, ApprovalInfo> getRemoved();
|
||||
|
||||
String getMessage();
|
||||
}
|
||||
|
||||
|
@@ -14,7 +14,6 @@
|
||||
|
||||
package com.google.gerrit.server.extensions.events;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.gerrit.extensions.api.changes.NotifyHandling;
|
||||
import com.google.gerrit.extensions.common.AccountInfo;
|
||||
import com.google.gerrit.extensions.common.ApprovalInfo;
|
||||
@@ -113,11 +112,6 @@ public class VoteDeleted {
|
||||
return oldApprovals;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, ApprovalInfo> getRemoved() {
|
||||
return Maps.difference(oldApprovals, approvals).entriesOnlyOnLeft();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return message;
|
||||
|
Reference in New Issue
Block a user