Add @Singleton/@Inject to IdmLightProxy 29/93629/1
authorRobert Varga <robert.varga@pantheon.tech>
Fri, 6 Nov 2020 15:13:26 +0000 (16:13 +0100)
committerRobert Varga <robert.varga@pantheon.tech>
Fri, 6 Nov 2020 15:14:07 +0000 (16:14 +0100)
This is a component, make sure it is tagged as such.

JIRA: AAA-209
Change-Id: Ia8d45fdfa932e14935faf4b9b518ab34e0d981b0
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
aaa-shiro/impl/src/main/java/org/opendaylight/aaa/shiro/idm/IdmLightProxy.java

index 38fafbd30676c7e85048fcc2cee884e06a56471b..a997893be96d2199edf5f331ee0168a70e1f8167 100644 (file)
@@ -12,8 +12,9 @@ import static java.util.Objects.requireNonNull;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
-import java.util.Objects;
 import java.util.concurrent.ConcurrentHashMap;
+import javax.inject.Inject;
+import javax.inject.Singleton;
 import org.opendaylight.aaa.api.AuthenticationException;
 import org.opendaylight.aaa.api.Claim;
 import org.opendaylight.aaa.api.ClaimCache;
@@ -37,8 +38,8 @@ import org.slf4j.LoggerFactory;
 /**
  * An OSGi proxy for the IdmLight server.
  */
+@Singleton
 public class IdmLightProxy implements PasswordCredentialAuth, IdMService, ClaimCache {
-
     private static final Logger LOG = LoggerFactory.getLogger(IdmLightProxy.class);
 
     /**
@@ -50,9 +51,10 @@ public class IdmLightProxy implements PasswordCredentialAuth, IdMService, ClaimC
     private final IIDMStore idmStore;
     private final PasswordHashService passwordService;
 
+    @Inject
     public IdmLightProxy(final IIDMStore idmStore, final PasswordHashService passwordService) {
         this.idmStore = idmStore;
-        this.passwordService = Objects.requireNonNull(passwordService);
+        this.passwordService = requireNonNull(passwordService);
     }
 
     @Override