summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/src/main/java/org/onap/policy/clamp/controlloop/common/handler/ControlLoopHandler.java15
-rw-r--r--common/src/test/java/org/onap/policy/clamp/controlloop/common/handler/ControlLoopHandlerTest.java7
-rw-r--r--common/src/test/java/org/onap/policy/clamp/controlloop/common/startstop/CommonCommandLineArgumentsTest.java2
3 files changed, 1 insertions, 23 deletions
diff --git a/common/src/main/java/org/onap/policy/clamp/controlloop/common/handler/ControlLoopHandler.java b/common/src/main/java/org/onap/policy/clamp/controlloop/common/handler/ControlLoopHandler.java
index 1bbe5662f..18297da42 100644
--- a/common/src/main/java/org/onap/policy/clamp/controlloop/common/handler/ControlLoopHandler.java
+++ b/common/src/main/java/org/onap/policy/clamp/controlloop/common/handler/ControlLoopHandler.java
@@ -20,14 +20,11 @@
package org.onap.policy.clamp.controlloop.common.handler;
-import java.util.HashSet;
import java.util.List;
-import java.util.Set;
import lombok.Getter;
import lombok.NonNull;
import org.onap.policy.common.endpoints.event.comm.TopicSink;
import org.onap.policy.common.endpoints.listeners.MessageTypeDispatcher;
-import org.onap.policy.common.utils.services.Registry;
import org.onap.policy.models.provider.PolicyModelsProviderParameters;
/**
@@ -47,21 +44,9 @@ public abstract class ControlLoopHandler {
protected ControlLoopHandler(@NonNull PolicyModelsProviderParameters databaseProviderParameters) {
this.databaseProviderParameters = databaseProviderParameters;
- Registry.register(this.getClass().getName(), this);
}
public void close() {
- Registry.unregister(this.getClass().getName());
- }
-
- /**
- * Get the provider classes that are used in instantiation.
- *
- * @return the provider classes
- */
- public Set<Class<?>> getProviderClasses() {
- // No REST interfaces are the default
- return new HashSet<>();
}
/**
diff --git a/common/src/test/java/org/onap/policy/clamp/controlloop/common/handler/ControlLoopHandlerTest.java b/common/src/test/java/org/onap/policy/clamp/controlloop/common/handler/ControlLoopHandlerTest.java
index 7a0479d29..7def2873a 100644
--- a/common/src/test/java/org/onap/policy/clamp/controlloop/common/handler/ControlLoopHandlerTest.java
+++ b/common/src/test/java/org/onap/policy/clamp/controlloop/common/handler/ControlLoopHandlerTest.java
@@ -25,7 +25,6 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.junit.jupiter.api.Test;
-import org.onap.policy.common.utils.services.Registry;
import org.onap.policy.models.provider.PolicyModelsProviderParameters;
class ControlLoopHandlerTest {
@@ -35,10 +34,6 @@ class ControlLoopHandlerTest {
assertThatThrownBy(() -> new DummyControlLoopHandler(null)).isInstanceOf(NullPointerException.class);
assertNotNull(new DummyControlLoopHandler(new PolicyModelsProviderParameters()));
- Registry.unregister(DummyControlLoopHandler.class.getName());
-
- String dummyClassName = DummyControlLoopHandler.class.getName();
- assertThatThrownBy(() -> Registry.get(dummyClassName)).isInstanceOf(IllegalArgumentException.class);
PolicyModelsProviderParameters pars = new PolicyModelsProviderParameters();
@@ -46,9 +41,7 @@ class ControlLoopHandlerTest {
assertNotNull(dclh);
assertEquals(pars, dclh.getDatabaseProviderParameters());
- assertEquals(0, dclh.getProviderClasses().size());
dclh.close();
- assertThatThrownBy(() -> Registry.get(dummyClassName)).isInstanceOf(IllegalArgumentException.class);
}
}
diff --git a/common/src/test/java/org/onap/policy/clamp/controlloop/common/startstop/CommonCommandLineArgumentsTest.java b/common/src/test/java/org/onap/policy/clamp/controlloop/common/startstop/CommonCommandLineArgumentsTest.java
index 715232f58..8eff21248 100644
--- a/common/src/test/java/org/onap/policy/clamp/controlloop/common/startstop/CommonCommandLineArgumentsTest.java
+++ b/common/src/test/java/org/onap/policy/clamp/controlloop/common/startstop/CommonCommandLineArgumentsTest.java
@@ -45,7 +45,7 @@ class CommonCommandLineArgumentsTest {
@Test
void testHelp() {
assertThat(cli.help("DummyClass", new Options()))
- .contains("DummyClass [options...]\noptions");
+ .contains("DummyClass [options...]" + System.lineSeparator() + "options");
}
@Test