Abandon: Remove unnecessary null check in updateChange

Callers can assume that ctx.getChange will not return null.

Change-Id: Id01318d9f71188770e26e76ca9775da9a9d0ae19
This commit is contained in:
David Pursehouse
2016-02-12 18:32:26 +09:00
parent 4e6ef29eab
commit 7f3a843cb7

View File

@@ -123,7 +123,7 @@ public class Abandon implements RestModifyView<ChangeResource, AbandonInput>,
change = ctx.getChange();
PatchSet.Id psId = change.currentPatchSetId();
ChangeUpdate update = ctx.getUpdate(psId);
if (change == null || !change.getStatus().isOpen()) {
if (!change.getStatus().isOpen()) {
throw new ResourceConflictException("change is " + status(change));
} else if (change.getStatus() == Change.Status.DRAFT) {
throw new ResourceConflictException(