No longer throw InvalidChangeOp in changeUpdated
InvalidChangeOperationExceptions are only thrown when we pass a null change to this method. It is better that we just don't pass the change and add a more useful error to the ReviewResult. We no longer perform a check to see if the patchset we have is the most current one. restore/abandon happens at the change level and the patchset is just fetched to append a message to the change. Change-Id: I3b3af1e3982fcd9111214a7c66a28476189c923b
This commit is contained in:
@@ -585,12 +585,8 @@ public class ChangeUtil {
|
||||
|
||||
public static <T extends ReplyToChangeSender> void updatedChange(
|
||||
final ReviewDb db, final IdentifiedUser user, final Change change,
|
||||
final ChangeMessage cmsg, ReplyToChangeSender.Factory<T> senderFactory,
|
||||
final String err) throws NoSuchChangeException,
|
||||
InvalidChangeOperationException, EmailException, OrmException {
|
||||
if (change == null) {
|
||||
throw new InvalidChangeOperationException(err);
|
||||
}
|
||||
final ChangeMessage cmsg, ReplyToChangeSender.Factory<T> senderFactory)
|
||||
throws NoSuchChangeException, EmailException, OrmException {
|
||||
db.changeMessages().insert(Collections.singleton(cmsg));
|
||||
|
||||
new ApprovalsUtil(db, null).syncChangeStatus(change);
|
||||
|
Reference in New Issue
Block a user