Make InvalidRevisionException a static class of CreateBranch
CreateBranch is the only place that InvalidRevisionException is used. Make it a private static class in GetBranch, and remove the now unused one from gerrit.common.errors. Change-Id: I29e412b8f11117a76cb325baab0ef1f08c86786f
This commit is contained in:
@@ -16,7 +16,6 @@ package com.google.gerrit.server.project;
|
||||
|
||||
import com.google.common.collect.Iterables;
|
||||
import com.google.gerrit.common.ChangeHooks;
|
||||
import com.google.gerrit.common.errors.InvalidRevisionException;
|
||||
import com.google.gerrit.extensions.api.projects.BranchInfo;
|
||||
import com.google.gerrit.extensions.restapi.AuthException;
|
||||
import com.google.gerrit.extensions.restapi.BadRequestException;
|
||||
@@ -253,4 +252,15 @@ public class CreateBranch implements RestModifyView<ProjectResource, Input> {
|
||||
throw new InvalidRevisionException();
|
||||
}
|
||||
}
|
||||
|
||||
/** Error indicating the revision is invalid as supplied. */
|
||||
private static class InvalidRevisionException extends Exception {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public static final String MESSAGE = "Invalid Revision";
|
||||
|
||||
public InvalidRevisionException() {
|
||||
super(MESSAGE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user