summaryrefslogtreecommitdiffstats
path: root/controlloop/common/actors/actorServiceProvider
diff options
context:
space:
mode:
authorKrishnajinka <kris.jinka@samsung.com>2018-08-06 14:18:00 +0900
committerKrishnakumar Jinka <kris.jinka@samsung.com>2018-08-06 22:30:03 +0000
commit4ab3c22a653129e347c712cc29118f94b238d87b (patch)
treee7866a94b8b0f25a810406a06ce6c98c1e2bf7e4 /controlloop/common/actors/actorServiceProvider
parent6a9ba373f3eb85e160dc30a54c4d82cff8542a36 (diff)
Fix basic code issues in controlloop
Found few issues while going through the code. Fixing these issues in the controlloop package classes Issue-ID: POLICY-1017 Change-Id: I24d0ce1257ad689c3e9d9b7a3bea07eeb65383f1 Signed-off-by: Krishnajinka <kris.jinka@samsung.com>
Diffstat (limited to 'controlloop/common/actors/actorServiceProvider')
-rw-r--r--controlloop/common/actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/ActorService.java2
-rw-r--r--controlloop/common/actors/actorServiceProvider/src/main/java/org/onap/policy/controlloop/actorserviceprovider/spi/Actor.java8
-rw-r--r--controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/TestActor.java24
3 files changed, 17 insertions, 17 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 b0b7eb566..aeb536c57 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
@@ -35,7 +35,7 @@ public class ActorService {
private static ActorService service;
// USed to load actors
- private ServiceLoader<Actor> loader;
+ private final ServiceLoader<Actor> loader;
private ActorService() {
loader = ServiceLoader.load(Actor.class);
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 46cc6f643..47e02a5cb 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
@@ -24,12 +24,12 @@ import java.util.List;
public interface Actor {
- public String actor();
+ String actor();
- public List<String> recipes();
+ List<String> recipes();
- public List<String> recipeTargets(String recipe);
+ List<String> recipeTargets(String recipe);
- public List<String> recipePayloads(String recipe);
+ List<String> recipePayloads(String recipe);
}
diff --git a/controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/TestActor.java b/controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/TestActor.java
index 0fd00e12a..af04cc138 100644
--- a/controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/TestActor.java
+++ b/controlloop/common/actors/actorServiceProvider/src/test/java/org/onap/policy/controlloop/actorserviceprovider/TestActor.java
@@ -33,28 +33,28 @@ public class TestActor implements Actor {
@Override
public List<String> recipes() {
- List<String> recipieList = new ArrayList<>();
- recipieList.add("Dorothy");
- recipieList.add("Wizard");
+ List<String> recipeList = new ArrayList<>();
+ recipeList.add("Dorothy");
+ recipeList.add("Wizard");
- return recipieList;
+ return recipeList;
}
@Override
public List<String> recipeTargets(String recipe) {
- List<String> recipieTargetList = new ArrayList<>();
- recipieTargetList.add("Wicked Witch");
- recipieTargetList.add("Wizard of Oz");
+ List<String> recipeTargetList = new ArrayList<>();
+ recipeTargetList.add("Wicked Witch");
+ recipeTargetList.add("Wizard of Oz");
- return recipieTargetList;
+ return recipeTargetList;
}
@Override
public List<String> recipePayloads(String recipe) {
- List<String> recipiePayloadList = new ArrayList<>();
- recipiePayloadList.add("Dorothy");
- recipiePayloadList.add("Toto");
+ List<String> recipePayloadList = new ArrayList<>();
+ recipePayloadList.add("Dorothy");
+ recipePayloadList.add("Toto");
- return recipiePayloadList;
+ return recipePayloadList;
}
}