aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/common/actors/actorServiceProvider/src
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2018-01-31 13:39:55 +0000
committerGerrit Code Review <gerrit@onap.org>2018-01-31 13:39:55 +0000
commit1cfa8e6246a72535e23388ed3fe9d52a6eea1989 (patch)
treed26c19b63f1d434b16a1228d51168e8a3c3fc71f /controlloop/common/actors/actorServiceProvider/src
parent1cd77623db3c66601eee6b6dd7cee7e6f5d5f53d (diff)
parentd896f94cecc28b5a91cd423ba62ee096dc0fac60 (diff)
Merge "Fix technical debt/JUnit on actor service provider"
Diffstat (limited to 'controlloop/common/actors/actorServiceProvider/src')
-rw-r--r--controlloop/common/actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorServiceProvider/ActorService.java12
-rw-r--r--controlloop/common/actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorServiceProvider/spi/Actor.java2
2 files changed, 8 insertions, 6 deletions
diff --git a/controlloop/common/actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorServiceProvider/ActorService.java b/controlloop/common/actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorServiceProvider/ActorService.java
index 330b1f97c..45bb9f265 100644
--- a/controlloop/common/actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorServiceProvider/ActorService.java
+++ b/controlloop/common/actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorServiceProvider/ActorService.java
@@ -18,12 +18,12 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.controlloop.actorServiceProvider;
+package org.onap.policy.controlloop.actorserviceprovider;
import java.util.Iterator;
import java.util.ServiceLoader;
-import org.onap.policy.controlloop.actorServiceProvider.spi.Actor;
+import org.onap.policy.controlloop.actorserviceprovider.spi.Actor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.collect.ImmutableList;
@@ -32,7 +32,8 @@ public class ActorService {
private static final Logger logger = LoggerFactory.getLogger(ActorService.class);
private static ActorService service;
-
+
+ // USed to load actors
private ServiceLoader<Actor> loader;
private ActorService() {
@@ -50,10 +51,11 @@ public class ActorService {
Iterator<Actor> iter = loader.iterator();
logger.debug("returning actors");
while (iter.hasNext()) {
- logger.debug("Got {}", iter.next().actor());
+ if (logger.isDebugEnabled()) {
+ logger.debug("Got {}", iter.next().actor());
+ }
}
return ImmutableList.copyOf(loader.iterator());
}
-
}
diff --git a/controlloop/common/actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorServiceProvider/spi/Actor.java b/controlloop/common/actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorServiceProvider/spi/Actor.java
index 2492063c8..b8e310d61 100644
--- a/controlloop/common/actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorServiceProvider/spi/Actor.java
+++ b/controlloop/common/actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorServiceProvider/spi/Actor.java
@@ -18,7 +18,7 @@
* ============LICENSE_END=========================================================
*/
-package org.onap.policy.controlloop.actorServiceProvider.spi;
+package org.onap.policy.controlloop.actorserviceprovider.spi;
import java.util.List;