Merge "CherryPick: Inline usage of ReviewDb to avoid resource warning"

This commit is contained in:
ekempin 2017-03-23 14:25:00 +00:00 committed by Gerrit Code Review
commit 0f839a42f8

View File

@ -66,9 +66,7 @@ public class CherryPick
throw new BadRequestException("destination must be non-empty"); throw new BadRequestException("destination must be non-empty");
} }
@SuppressWarnings("resource") if (!control.isVisible(dbProvider.get())) {
ReviewDb db = dbProvider.get();
if (!control.isVisible(db)) {
throw new AuthException("Cherry pick not permitted"); throw new AuthException("Cherry pick not permitted");
} }