Return specific types from REST API implementations where possible

Change-Id: I0e5d44ecd44dd1fba751030506e05d35ee63f862
This commit is contained in:
David Pursehouse
2016-09-01 14:39:17 +09:00
parent 500994310d
commit a0e06541f3
5 changed files with 13 additions and 6 deletions

View File

@@ -20,7 +20,9 @@ import com.google.gerrit.extensions.restapi.DefaultInput;
import com.google.gerrit.extensions.restapi.MethodNotAllowedException;
import com.google.gerrit.extensions.restapi.ResourceConflictException;
import com.google.gerrit.extensions.restapi.ResourceNotFoundException;
import com.google.gerrit.extensions.restapi.Response;
import com.google.gerrit.extensions.restapi.RestModifyView;
import com.google.gerrit.server.project.DashboardsCollection.DashboardInfo;
import com.google.gerrit.server.project.SetDashboard.Input;
import com.google.inject.Inject;
import com.google.inject.Provider;
@@ -44,7 +46,7 @@ class SetDashboard implements RestModifyView<DashboardResource, Input> {
}
@Override
public Object apply(DashboardResource resource, Input input)
public Response<DashboardInfo> apply(DashboardResource resource, Input input)
throws AuthException, BadRequestException, ResourceConflictException,
MethodNotAllowedException, ResourceNotFoundException, IOException {
if (resource.isProjectDefault()) {