AccountUtil: Inject CreateAccount.Factory through constructor
This makes the injection consistent with other injections in this
class.
Change-Id: I4c0781fd01da405ba030cf8e1eb6565aa604672f
Signed-off-by: Edwin Kempin <ekempin@google.com>
diff --git a/src/main/java/com/googlesource/gerrit/plugins/importer/AccountUtil.java b/src/main/java/com/googlesource/gerrit/plugins/importer/AccountUtil.java
index d096a83..0edb603 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/importer/AccountUtil.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/importer/AccountUtil.java
@@ -56,9 +56,7 @@
private final AuthType authType;
private final com.google.gerrit.extensions.api.GerritApi gApi;
private final VersionedAuthorizedKeys.Accessor authorizedKeys;
-
- @Inject
- private CreateAccount.Factory createAccountFactory;
+ private final CreateAccount.Factory createAccountFactory;
@Inject
public AccountUtil(
@@ -66,12 +64,14 @@
AccountManager accountManager,
AuthConfig authConfig,
com.google.gerrit.extensions.api.GerritApi gApi,
- VersionedAuthorizedKeys.Accessor authorizedKeys) {
+ VersionedAuthorizedKeys.Accessor authorizedKeys,
+ CreateAccount.Factory createAccountFactory) {
this.accountCache = accountCache;
this.accountManager = accountManager;
this.authType = authConfig.getAuthType();
this.gApi = gApi;
this.authorizedKeys = authorizedKeys;
+ this.createAccountFactory = createAccountFactory;
}
Account.Id resolveUser(GerritApi api, AccountInfo acc)