diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/change/PutDraft.java b/gerrit-server/src/main/java/com/google/gerrit/server/change/PutDraft.java index c644759df7..c1fb30430a 100644 --- a/gerrit-server/src/main/java/com/google/gerrit/server/change/PutDraft.java +++ b/gerrit-server/src/main/java/com/google/gerrit/server/change/PutDraft.java @@ -50,10 +50,10 @@ class PutDraft implements RestModifyView { } private final Provider db; - private final Provider delete; + private final DeleteDraft delete; @Inject - PutDraft(Provider db, Provider delete) { + PutDraft(Provider db, DeleteDraft delete) { this.db = db; this.delete = delete; } @@ -63,7 +63,7 @@ class PutDraft implements RestModifyView { BadRequestException, OrmException { PatchLineComment c = rsrc.getComment(); if (in == null || in.message == null || in.message.trim().isEmpty()) { - return delete.get().apply(rsrc, null); + return delete.apply(rsrc, null); } else if (in.id != null && !rsrc.getId().equals(in.id)) { throw new BadRequestException("id must match URL"); } else if (in.line != null && in.line < 0) {