Move more endpoints to singleton scope and remove providers
Ia2ac8cfcc moved some REST endpoints to singleton scope, but missed to remove providers from these endpoints, where they get injected. When a singleton injects another singleton, this is only an overhead to inject it as a provider to singleton and not directly. Change-Id: I6d6f361cc2c46440845ef13ccacb8ec4f28c9b36
This commit is contained in:
@@ -25,6 +25,7 @@ import com.google.gerrit.server.project.ChangeControl;
|
||||
import com.google.gwtorm.server.OrmException;
|
||||
import com.google.inject.Inject;
|
||||
import com.google.inject.Provider;
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
import org.eclipse.jgit.errors.IncorrectObjectTypeException;
|
||||
import org.eclipse.jgit.errors.MissingObjectException;
|
||||
@@ -36,6 +37,7 @@ import org.eclipse.jgit.revwalk.RevWalk;
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
|
||||
@Singleton
|
||||
class IncludedIn implements RestReadView<ChangeResource> {
|
||||
|
||||
private final Provider<ReviewDb> db;
|
||||
|
||||
Reference in New Issue
Block a user