Replace uses of getCanonicalName() with getName() in APEX
Change-Id: Ifcd8866e65a7bc1238d5a4137f7bad288a5bfb3b
Issue-ID: POLICY-1861
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
diff --git a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/ApexCommandLineEditorMain.java b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/ApexCommandLineEditorMain.java
index b632514..fc94243 100644
--- a/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/ApexCommandLineEditorMain.java
+++ b/auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/ApexCommandLineEditorMain.java
@@ -64,7 +64,7 @@
parameters = parser.parse(args);
if (parameters.isHelpSet()) {
- parser.help(ApexCommandLineEditorMain.class.getCanonicalName());
+ parser.help(ApexCommandLineEditorMain.class.getName());
return;
}
parameters.validate();
diff --git a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperParameters.java b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperParameters.java
index 01a5df2..7e6df77 100644
--- a/context/context-management/src/main/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperParameters.java
+++ b/context/context-management/src/main/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperParameters.java
@@ -23,7 +23,6 @@
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Map.Entry;
-
import org.onap.policy.apex.context.parameters.SchemaHelperParameters;
import org.onap.policy.common.parameters.GroupValidationResult;
@@ -41,12 +40,12 @@
*/
public JavaSchemaHelperParameters() {
this.setName("Java");
- this.setSchemaHelperPluginClass(JavaSchemaHelper.class.getCanonicalName());
+ this.setSchemaHelperPluginClass(JavaSchemaHelper.class.getName());
}
-
+
/**
* Get the JSON adapters.
- *
+ *
* @return the JSON adapters
*/
public Map<String, JavaSchemaHelperJsonAdapterParameters> getJsonAdapters() {
@@ -55,7 +54,7 @@
/**
* Set JSON adapters for the schema helper.
- *
+ *
* @param jsonAdapters the JSON adapters
*/
public void setJsonAdapters(Map<String, JavaSchemaHelperJsonAdapterParameters> jsonAdapters) {
diff --git a/context/context-management/src/main/java/org/onap/policy/apex/context/parameters/DistributorParameters.java b/context/context-management/src/main/java/org/onap/policy/apex/context/parameters/DistributorParameters.java
index 79310a0..8cb6c59 100644
--- a/context/context-management/src/main/java/org/onap/policy/apex/context/parameters/DistributorParameters.java
+++ b/context/context-management/src/main/java/org/onap/policy/apex/context/parameters/DistributorParameters.java
@@ -33,7 +33,7 @@
*/
public class DistributorParameters implements ParameterGroup {
/** The default distributor makes context albums available to all threads in a single JVM. */
- public static final String DEFAULT_DISTRIBUTOR_PLUGIN_CLASS = JvmLocalDistributor.class.getCanonicalName();
+ public static final String DEFAULT_DISTRIBUTOR_PLUGIN_CLASS = JvmLocalDistributor.class.getName();
private String name;
private String pluginClass = DEFAULT_DISTRIBUTOR_PLUGIN_CLASS;
diff --git a/context/context-management/src/main/java/org/onap/policy/apex/context/parameters/LockManagerParameters.java b/context/context-management/src/main/java/org/onap/policy/apex/context/parameters/LockManagerParameters.java
index ed23af1..2f8aa0d 100644
--- a/context/context-management/src/main/java/org/onap/policy/apex/context/parameters/LockManagerParameters.java
+++ b/context/context-management/src/main/java/org/onap/policy/apex/context/parameters/LockManagerParameters.java
@@ -35,7 +35,7 @@
/**
* The default lock manager can lock context album instance across all threads in a single JVM.
*/
- public static final String DEFAULT_LOCK_MANAGER_PLUGIN_CLASS = JvmLocalLockManager.class.getCanonicalName();
+ public static final String DEFAULT_LOCK_MANAGER_PLUGIN_CLASS = JvmLocalLockManager.class.getName();
private String name;
private String pluginClass = DEFAULT_LOCK_MANAGER_PLUGIN_CLASS;
diff --git a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/EnFieldTest.java b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/EnFieldTest.java
index 6228c68..9fd26f1 100644
--- a/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/EnFieldTest.java
+++ b/core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/EnFieldTest.java
@@ -84,7 +84,7 @@
assertEquals(fieldKey, field.getKey());
assertEquals("MyField", field.getName());
assertEquals("org.onap.policy.apex.context.impl.schema.java.JavaSchemaHelper",
- field.getSchemaHelper().getClass().getCanonicalName());
+ field.getSchemaHelper().getClass().getName());
assertEquals(123, field.getAssignableValue());
assertEquals("EnField [axField=AxField:(key=AxReferenceKey:(parentKeyName=Parent,parentKeyVersion=0.0.1,"
+ "parentLocalName=MyParent,localName=MyField),fieldSchemaKey=AxArtifactKey:"
diff --git a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxValidationMessage.java b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxValidationMessage.java
index 3e09e1c..c98ce51 100644
--- a/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxValidationMessage.java
+++ b/model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxValidationMessage.java
@@ -53,7 +53,7 @@
Assertions.argumentNotNull(message, "message may not be null");
this.observedKey = observedKey;
- this.observedClass = observedClass.getCanonicalName();
+ this.observedClass = observedClass.getName();
this.validationResult = validationResult;
this.message = message;
}
diff --git a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ValidationTest.java b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ValidationTest.java
index f30babe..f2f99a8 100644
--- a/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ValidationTest.java
+++ b/model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ValidationTest.java
@@ -88,7 +88,7 @@
assertEquals(AxValidationResult.ValidationResult.INVALID, result.getMessageList().get(3).getValidationResult());
assertEquals("Some message", result.getMessageList().get(3).getMessage());
- assertEquals(AxArtifactKey.class.getCanonicalName(), result.getMessageList().get(3).getObservedClass());
+ assertEquals(AxArtifactKey.class.getName(), result.getMessageList().get(3).getObservedClass());
assertEquals(AxArtifactKey.getNullKey(), result.getMessageList().get(3).getObservedKey());
}
}
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/JmsCarrierTechnologyParameters.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/JmsCarrierTechnologyParameters.java
index b34f29e..8aed15e 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/JmsCarrierTechnologyParameters.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/JmsCarrierTechnologyParameters.java
@@ -75,10 +75,10 @@
public static final String JMS_CARRIER_TECHNOLOGY_LABEL = "JMS";
/** The producer plugin class for the JMS carrier technology. */
- public static final String JMS_EVENT_PRODUCER_PLUGIN_CLASS = ApexJmsProducer.class.getCanonicalName();
+ public static final String JMS_EVENT_PRODUCER_PLUGIN_CLASS = ApexJmsProducer.class.getName();
/** The consumer plugin class for the JMS carrier technology. */
- public static final String JMS_EVENT_CONSUMER_PLUGIN_CLASS = ApexJmsConsumer.class.getCanonicalName();
+ public static final String JMS_EVENT_CONSUMER_PLUGIN_CLASS = ApexJmsConsumer.class.getName();
// @formatter:off
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/JmsCarrierTechnologyParametersTest.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/JmsCarrierTechnologyParametersTest.java
index 18fc1f6..eb0e3d8 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/JmsCarrierTechnologyParametersTest.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/JmsCarrierTechnologyParametersTest.java
@@ -44,10 +44,10 @@
public static final String JMS_CARRIER_TECHNOLOGY_LABEL = "JMS";
public static final String JMS_EVENT_PRODUCER_PLUGIN_CLASS =
- ApexJmsProducer.class.getCanonicalName();
+ ApexJmsProducer.class.getName();
public static final String JMS_EVENT_CONSUMER_PLUGIN_CLASS =
- ApexJmsConsumer.class.getCanonicalName();
+ ApexJmsConsumer.class.getName();
private static final String DEFAULT_CONNECTION_FACTORY = "jms/RemoteConnectionFactory";
private static final String DEFAULT_INITIAL_CTXT_FACTORY =
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/KafkaCarrierTechnologyParameters.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/KafkaCarrierTechnologyParameters.java
index 6aa9d53..36947ee 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/KafkaCarrierTechnologyParameters.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/KafkaCarrierTechnologyParameters.java
@@ -41,10 +41,10 @@
public static final String KAFKA_CARRIER_TECHNOLOGY_LABEL = "KAFKA";
/** The producer plugin class for the Kafka carrier technology. */
- public static final String KAFKA_EVENT_PRODUCER_PLUGIN_CLASS = ApexKafkaProducer.class.getCanonicalName();
+ public static final String KAFKA_EVENT_PRODUCER_PLUGIN_CLASS = ApexKafkaProducer.class.getName();
/** The consumer plugin class for the Kafka carrier technology. */
- public static final String KAFKA_EVENT_CONSUMER_PLUGIN_CLASS = ApexKafkaConsumer.class.getCanonicalName();
+ public static final String KAFKA_EVENT_CONSUMER_PLUGIN_CLASS = ApexKafkaConsumer.class.getName();
// Repeated strings in messages
private static final String SPECIFY_AS_STRING_MESSAGE = "not specified, must be specified as a string";
@@ -65,7 +65,7 @@
private static final String[] DEFAULT_CONS_TOPICLIST = {"apex-in"};
private static final String DEFAULT_STRING_SERZER = "org.apache.kafka.common.serialization.StringSerializer";
private static final String DEFAULT_STRING_DESZER = "org.apache.kafka.common.serialization.StringDeserializer";
- private static final String DEFAULT_PARTITIONR_CLASS = DefaultPartitioner.class.getCanonicalName();
+ private static final String DEFAULT_PARTITIONR_CLASS = DefaultPartitioner.class.getName();
// Parameter property map tokens
private static final String PROPERTY_BOOTSTRAP_SERVERS = "bootstrap.servers";
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/RestClientCarrierTechnologyParameters.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/RestClientCarrierTechnologyParameters.java
index c8e5553..258c01d 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/RestClientCarrierTechnologyParameters.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/RestClientCarrierTechnologyParameters.java
@@ -53,10 +53,10 @@
public static final String RESTCLIENT_CARRIER_TECHNOLOGY_LABEL = "RESTCLIENT";
/** The producer plugin class for the REST carrier technology. */
- public static final String RESTCLIENT_EVENT_PRODUCER_PLUGIN_CLASS = ApexRestClientProducer.class.getCanonicalName();
+ public static final String RESTCLIENT_EVENT_PRODUCER_PLUGIN_CLASS = ApexRestClientProducer.class.getName();
/** The consumer plugin class for the REST carrier technology. */
- public static final String RESTCLIENT_EVENT_CONSUMER_PLUGIN_CLASS = ApexRestClientConsumer.class.getCanonicalName();
+ public static final String RESTCLIENT_EVENT_CONSUMER_PLUGIN_CLASS = ApexRestClientConsumer.class.getName();
// Commonly occurring strings
private static final String HTTP_HEADERS = "httpHeaders";
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerCarrierTechnologyParameters.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerCarrierTechnologyParameters.java
index 76ec577..7f6a09e 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerCarrierTechnologyParameters.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerCarrierTechnologyParameters.java
@@ -49,10 +49,10 @@
public static final String RESTSERVER_CARRIER_TECHNOLOGY_LABEL = "RESTSERVER";
/** The producer plugin class for the REST carrier technology. */
- public static final String RESTSERVER_EVENT_PRODUCER_PLUGIN_CLASS = ApexRestServerProducer.class.getCanonicalName();
+ public static final String RESTSERVER_EVENT_PRODUCER_PLUGIN_CLASS = ApexRestServerProducer.class.getName();
/** The consumer plugin class for the REST carrier technology. */
- public static final String RESTSERVER_EVENT_CONSUMER_PLUGIN_CLASS = ApexRestServerConsumer.class.getCanonicalName();
+ public static final String RESTSERVER_EVENT_CONSUMER_PLUGIN_CLASS = ApexRestServerConsumer.class.getName();
// REST server parameters
private boolean standalone = false;
diff --git a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/main/java/org/onap/policy/apex/plugins/event/carrier/websocket/WebSocketCarrierTechnologyParameters.java b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/main/java/org/onap/policy/apex/plugins/event/carrier/websocket/WebSocketCarrierTechnologyParameters.java
index 9febeb4..1fc18f6 100644
--- a/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/main/java/org/onap/policy/apex/plugins/event/carrier/websocket/WebSocketCarrierTechnologyParameters.java
+++ b/plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/main/java/org/onap/policy/apex/plugins/event/carrier/websocket/WebSocketCarrierTechnologyParameters.java
@@ -38,10 +38,10 @@
public static final String WEB_SCOKET_CARRIER_TECHNOLOGY_LABEL = "WEBSOCKET";
/** The producer plugin class for the web socket carrier technology. */
- public static final String WEB_SCOKET_EVENT_PRODUCER_PLUGIN_CLASS = ApexWebSocketProducer.class.getCanonicalName();
+ public static final String WEB_SCOKET_EVENT_PRODUCER_PLUGIN_CLASS = ApexWebSocketProducer.class.getName();
/** The consumer plugin class for the web socket carrier technology. */
- public static final String KWEB_SCOKET_EVENT_CONSUMER_PLUGIN_CLASS = ApexWebSocketConsumer.class.getCanonicalName();
+ public static final String KWEB_SCOKET_EVENT_CONSUMER_PLUGIN_CLASS = ApexWebSocketConsumer.class.getName();
// Default parameter values
private static final String DEFAULT_HOST = "localhost";
diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/JmsObjectEventProtocolParameters.java b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/JmsObjectEventProtocolParameters.java
index 86ad000..08875e1 100644
--- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/JmsObjectEventProtocolParameters.java
+++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/JmsObjectEventProtocolParameters.java
@@ -86,7 +86,7 @@
this.setLabel(JMS_OBJECT_EVENT_PROTOCOL_LABEL);
// Set the event protocol plugin class
- this.setEventProtocolPluginClass(Apex2JmsObjectEventConverter.class.getCanonicalName());
+ this.setEventProtocolPluginClass(Apex2JmsObjectEventConverter.class.getName());
}
/**
diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/JmsTextEventProtocolParameters.java b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/JmsTextEventProtocolParameters.java
index ad6675c..85ca1a8 100644
--- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/JmsTextEventProtocolParameters.java
+++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/JmsTextEventProtocolParameters.java
@@ -51,6 +51,6 @@
this.setLabel(JMS_TEXT_EVENT_PROTOCOL_LABEL);
// Set the event protocol plugin class
- this.setEventProtocolPluginClass(Apex2JmsTextEventConverter.class.getCanonicalName());
+ this.setEventProtocolPluginClass(Apex2JmsTextEventConverter.class.getName());
}
}
diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/XmlEventProtocolParameters.java b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/XmlEventProtocolParameters.java
index a65e276..143669d 100644
--- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/XmlEventProtocolParameters.java
+++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/XmlEventProtocolParameters.java
@@ -48,6 +48,6 @@
this.setStartDelimiterToken(XML_TEXT_DELIMITER_TOKEN);
// Set the event protocol plugin class
- this.setEventProtocolPluginClass(Apex2XmlEventConverter.class.getCanonicalName());
+ this.setEventProtocolPluginClass(Apex2XmlEventConverter.class.getName());
}
}
diff --git a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/main/java/org/onap/policy/apex/plugins/event/protocol/yaml/YamlEventProtocolParameters.java b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/main/java/org/onap/policy/apex/plugins/event/protocol/yaml/YamlEventProtocolParameters.java
index 3c0011c..b538b58 100644
--- a/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/main/java/org/onap/policy/apex/plugins/event/protocol/yaml/YamlEventProtocolParameters.java
+++ b/plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/main/java/org/onap/policy/apex/plugins/event/protocol/yaml/YamlEventProtocolParameters.java
@@ -89,7 +89,7 @@
this.setEndDelimiterToken(YAML_END_TEXT_DELIMITER_TOKEN);
// Set the event protocol plugin class
- this.setEventProtocolPluginClass(Apex2YamlEventConverter.class.getCanonicalName());
+ this.setEventProtocolPluginClass(Apex2YamlEventConverter.class.getName());
}
/**
diff --git a/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaExecutorParameters.java b/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaExecutorParameters.java
index 64abeac..ade35ce 100644
--- a/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaExecutorParameters.java
+++ b/plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaExecutorParameters.java
@@ -35,8 +35,8 @@
* Constructor that sets the abstract implementation classes.
*/
public JavaExecutorParameters() {
- this.setTaskExecutorPluginClass(JavaTaskExecutor.class.getCanonicalName());
- this.setTaskSelectionExecutorPluginClass(JavaTaskSelectExecutor.class.getCanonicalName());
- this.setStateFinalizerExecutorPluginClass(JavaStateFinalizerExecutor.class.getCanonicalName());
+ this.setTaskExecutorPluginClass(JavaTaskExecutor.class.getName());
+ this.setTaskSelectionExecutorPluginClass(JavaTaskSelectExecutor.class.getName());
+ this.setStateFinalizerExecutorPluginClass(JavaStateFinalizerExecutor.class.getName());
}
}
diff --git a/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptExecutorParameters.java b/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptExecutorParameters.java
index bbbea93..75591aa 100644
--- a/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptExecutorParameters.java
+++ b/plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptExecutorParameters.java
@@ -35,8 +35,8 @@
* Constructor that sets the abstract implementation classes.
*/
public JavascriptExecutorParameters() {
- this.setTaskExecutorPluginClass(JavascriptTaskExecutor.class.getCanonicalName());
- this.setTaskSelectionExecutorPluginClass(JavascriptTaskSelectExecutor.class.getCanonicalName());
- this.setStateFinalizerExecutorPluginClass(JavascriptStateFinalizerExecutor.class.getCanonicalName());
+ this.setTaskExecutorPluginClass(JavascriptTaskExecutor.class.getName());
+ this.setTaskSelectionExecutorPluginClass(JavascriptTaskSelectExecutor.class.getName());
+ this.setStateFinalizerExecutorPluginClass(JavascriptStateFinalizerExecutor.class.getName());
}
}
diff --git a/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyExecutorParameters.java b/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyExecutorParameters.java
index 0245cd8..33d8636 100644
--- a/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyExecutorParameters.java
+++ b/plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyExecutorParameters.java
@@ -35,8 +35,8 @@
* Constructor that sets the abstract implementation classes.
*/
public JrubyExecutorParameters() {
- this.setTaskExecutorPluginClass(JrubyTaskExecutor.class.getCanonicalName());
- this.setTaskSelectionExecutorPluginClass(JrubyTaskSelectExecutor.class.getCanonicalName());
- this.setStateFinalizerExecutorPluginClass(JrubyStateFinalizerExecutor.class.getCanonicalName());
+ this.setTaskExecutorPluginClass(JrubyTaskExecutor.class.getName());
+ this.setTaskSelectionExecutorPluginClass(JrubyTaskSelectExecutor.class.getName());
+ this.setStateFinalizerExecutorPluginClass(JrubyStateFinalizerExecutor.class.getName());
}
}
diff --git a/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonExecutorParameters.java b/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonExecutorParameters.java
index 7a22013..e861a10 100644
--- a/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonExecutorParameters.java
+++ b/plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonExecutorParameters.java
@@ -35,8 +35,8 @@
* Constructor that sets the abstract implementation classes.
*/
public JythonExecutorParameters() {
- this.setTaskExecutorPluginClass(JythonTaskExecutor.class.getCanonicalName());
- this.setTaskSelectionExecutorPluginClass(JythonTaskSelectExecutor.class.getCanonicalName());
- this.setStateFinalizerExecutorPluginClass(JythonStateFinalizerExecutor.class.getCanonicalName());
+ this.setTaskExecutorPluginClass(JythonTaskExecutor.class.getName());
+ this.setTaskSelectionExecutorPluginClass(JythonTaskSelectExecutor.class.getName());
+ this.setStateFinalizerExecutorPluginClass(JythonStateFinalizerExecutor.class.getName());
}
}
diff --git a/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelExecutorParameters.java b/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelExecutorParameters.java
index 7b57ad4..241d757 100644
--- a/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelExecutorParameters.java
+++ b/plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelExecutorParameters.java
@@ -35,8 +35,8 @@
* Constructor that sets the abstract implementation classes.
*/
public MvelExecutorParameters() {
- this.setTaskExecutorPluginClass(MvelTaskExecutor.class.getCanonicalName());
- this.setTaskSelectionExecutorPluginClass(MvelTaskSelectExecutor.class.getCanonicalName());
- this.setStateFinalizerExecutorPluginClass(MvelStateFinalizerExecutor.class.getCanonicalName());
+ this.setTaskExecutorPluginClass(MvelTaskExecutor.class.getName());
+ this.setTaskSelectionExecutorPluginClass(MvelTaskSelectExecutor.class.getName());
+ this.setStateFinalizerExecutorPluginClass(MvelStateFinalizerExecutor.class.getName());
}
}
diff --git a/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-eclipselink/src/test/java/org/onap/policy/apex/plugins/persistence/jpa/eclipselink/EclipselinkApexDaoTest.java b/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-eclipselink/src/test/java/org/onap/policy/apex/plugins/persistence/jpa/eclipselink/EclipselinkApexDaoTest.java
index 311af82..de3a39e 100644
--- a/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-eclipselink/src/test/java/org/onap/policy/apex/plugins/persistence/jpa/eclipselink/EclipselinkApexDaoTest.java
+++ b/plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-eclipselink/src/test/java/org/onap/policy/apex/plugins/persistence/jpa/eclipselink/EclipselinkApexDaoTest.java
@@ -62,7 +62,7 @@
*/
@Before
public void setup() throws ApexException {
- daoParameters.setPluginClass(EclipselinkApexDao.class.getCanonicalName());
+ daoParameters.setPluginClass(EclipselinkApexDao.class.getName());
daoParameters.setPersistenceUnit("DAOTest");
eclipselinkApexDao = new EclipselinkApexDao();
eclipselinkApexDao.init(daoParameters);
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/apexprotocolplugin/ApexEventProtocolParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/apexprotocolplugin/ApexEventProtocolParameters.java
index b9e1648..8df3a65 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/apexprotocolplugin/ApexEventProtocolParameters.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/apexprotocolplugin/ApexEventProtocolParameters.java
@@ -51,6 +51,6 @@
this.setLabel(eventProtocolLabel);
// Set the event protocol plugin class
- this.setEventProtocolPluginClass(Apex2ApexEventConverter.class.getCanonicalName());
+ this.setEventProtocolPluginClass(Apex2ApexEventConverter.class.getName());
}
}
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/eventrequestor/EventRequestorCarrierTechnologyParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/eventrequestor/EventRequestorCarrierTechnologyParameters.java
index 839b4bf..0d2be38 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/eventrequestor/EventRequestorCarrierTechnologyParameters.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/eventrequestor/EventRequestorCarrierTechnologyParameters.java
@@ -36,11 +36,11 @@
/** The producer plugin class for the EVENT_REQUESTOR carrier technology. */
public static final String EVENT_REQUESTOR_EVENT_PRODUCER_PLUGIN_CLASS =
- EventRequestorProducer.class.getCanonicalName();
+ EventRequestorProducer.class.getName();
/** The consumer plugin class for the EVENT_REQUESTOR carrier technology. */
public static final String EVENT_REQUESTOR_EVENT_CONSUMER_PLUGIN_CLASS =
- EventRequestorConsumer.class.getCanonicalName();
+ EventRequestorConsumer.class.getName();
// @formatter:on
/**
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/FileCarrierTechnologyParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/FileCarrierTechnologyParameters.java
index 73438cc..31cd28d 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/FileCarrierTechnologyParameters.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/FileCarrierTechnologyParameters.java
@@ -49,10 +49,10 @@
public static final String FILE_CARRIER_TECHNOLOGY_LABEL = "FILE";
/** The producer plugin class for the FILE carrier technology. */
- public static final String FILE_EVENT_PRODUCER_PLUGIN_CLASS = ApexFileEventProducer.class.getCanonicalName();
+ public static final String FILE_EVENT_PRODUCER_PLUGIN_CLASS = ApexFileEventProducer.class.getName();
/** The consumer plugin class for the FILE carrier technology. */
- public static final String FILE_EVENT_CONSUMER_PLUGIN_CLASS = ApexFileEventConsumer.class.getCanonicalName();
+ public static final String FILE_EVENT_CONSUMER_PLUGIN_CLASS = ApexFileEventConsumer.class.getName();
// Recurring strings
private static final String FILE_NAME_TOKEN = "fileName";
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/jsonprotocolplugin/JsonEventProtocolParameters.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/jsonprotocolplugin/JsonEventProtocolParameters.java
index 5ff795d..d8cd128 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/jsonprotocolplugin/JsonEventProtocolParameters.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/jsonprotocolplugin/JsonEventProtocolParameters.java
@@ -89,12 +89,12 @@
this.setEndChar(JSON_TEXT_BLOCK_END_DELIMITER);
// Set the event protocol plugin class
- this.setEventProtocolPluginClass(Apex2JsonEventConverter.class.getCanonicalName());
+ this.setEventProtocolPluginClass(Apex2JsonEventConverter.class.getName());
}
/*
* (non-Javadoc)
- *
+ *
* @see org.onap.policy.common.parameters.ParameterGroup#getName()
*/
@Override
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexCommandLineArguments.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexCommandLineArguments.java
index 7333275..e05e02c 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexCommandLineArguments.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexCommandLineArguments.java
@@ -151,7 +151,7 @@
}
if (commandLine.hasOption('h')) {
- return help(ApexMain.class.getCanonicalName());
+ return help(ApexMain.class.getName());
}
if (commandLine.hasOption('v')) {
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParametersJsonAdapter.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParametersJsonAdapter.java
index 5e320b1..6398008 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParametersJsonAdapter.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParametersJsonAdapter.java
@@ -60,12 +60,12 @@
// Built in technology parameters
private static final Map<String, String> BUILT_IN_CARRIER_TECHNOLOGY_PARMETER_CLASS_MAP = new HashMap<>();
-
+
static {
BUILT_IN_CARRIER_TECHNOLOGY_PARMETER_CLASS_MAP.put("FILE",
- FileCarrierTechnologyParameters.class.getCanonicalName());
+ FileCarrierTechnologyParameters.class.getName());
BUILT_IN_CARRIER_TECHNOLOGY_PARMETER_CLASS_MAP.put("EVENT_REQUESTOR",
- EventRequestorCarrierTechnologyParameters.class.getCanonicalName());
+ EventRequestorCarrierTechnologyParameters.class.getName());
}
/*
diff --git a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParametersJsonAdapter.java b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParametersJsonAdapter.java
index ba37fe8..b03c365 100644
--- a/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParametersJsonAdapter.java
+++ b/services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParametersJsonAdapter.java
@@ -59,10 +59,10 @@
// Built in event protocol parameters
private static final Map<String, String> BUILT_IN_EVENT_PROTOCOL_PARMETER_CLASS_MAP = new HashMap<>();
-
+
static {
- BUILT_IN_EVENT_PROTOCOL_PARMETER_CLASS_MAP.put("JSON", JsonEventProtocolParameters.class.getCanonicalName());
- BUILT_IN_EVENT_PROTOCOL_PARMETER_CLASS_MAP.put("APEX", ApexEventProtocolParameters.class.getCanonicalName());
+ BUILT_IN_EVENT_PROTOCOL_PARMETER_CLASS_MAP.put("JSON", JsonEventProtocolParameters.class.getName());
+ BUILT_IN_EVENT_PROTOCOL_PARMETER_CLASS_MAP.put("APEX", ApexEventProtocolParameters.class.getName());
}
/*
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java
index 56e716d..ab05dc7 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java
@@ -136,7 +136,7 @@
final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
assertEquals("org.onap.policy.apex.context.parameters.ContextParameters",
parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getClass().getCanonicalName());
+ .getClass().getName());
assertEquals(123456, parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
.getPersistorParameters().getFlushPeriod());
} catch (final ParameterException e) {
@@ -154,7 +154,7 @@
final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
assertEquals("org.onap.policy.apex.context.parameters.ContextParameters",
parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getClass().getCanonicalName());
+ .getClass().getName());
assertEquals(300000, parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
.getPersistorParameters().getFlushPeriod());
} catch (final ParameterException e) {
@@ -172,10 +172,10 @@
final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
assertEquals("org.onap.policy.apex.context.parameters.ContextParameters",
parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getClass().getCanonicalName());
+ .getClass().getName());
assertEquals("org.onap.policy.apex.context.parameters.DistributorParameters",
parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getDistributorParameters().getClass().getCanonicalName());
+ .getDistributorParameters().getClass().getName());
} catch (final ParameterException e) {
fail("This test should not throw any exception: " + e.getMessage());
}
@@ -191,16 +191,16 @@
final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
assertEquals("org.onap.policy.apex.context.parameters.ContextParameters",
parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getClass().getCanonicalName());
+ .getClass().getName());
assertEquals("org.onap.policy.apex.context.parameters.DistributorParameters",
parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getDistributorParameters().getClass().getCanonicalName());
+ .getDistributorParameters().getClass().getName());
assertEquals("org.onap.policy.apex.context.parameters.LockManagerParameters",
parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getLockManagerParameters().getClass().getCanonicalName());
+ .getLockManagerParameters().getClass().getName());
assertEquals("org.onap.policy.apex.context.parameters.PersistorParameters",
parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getPersistorParameters().getClass().getCanonicalName());
+ .getPersistorParameters().getClass().getName());
assertEquals(300000, parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
.getPersistorParameters().getFlushPeriod());
} catch (final ParameterException e) {
@@ -218,13 +218,13 @@
final ApexParameters parameters = new ApexParameterHandler().getParameters(arguments);
assertEquals("org.onap.policy.apex.context.parameters.ContextParameters",
parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getClass().getCanonicalName());
+ .getClass().getName());
assertEquals("org.onap.policy.apex.context.parameters.LockManagerParameters",
parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getLockManagerParameters().getClass().getCanonicalName());
+ .getLockManagerParameters().getClass().getName());
assertEquals("org.onap.policy.apex.context.parameters.PersistorParameters",
parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
- .getPersistorParameters().getClass().getCanonicalName());
+ .getPersistorParameters().getClass().getName());
assertEquals(123456, parameters.getEngineServiceParameters().getEngineParameters().getContextParameters()
.getPersistorParameters().getFlushPeriod());
@@ -232,7 +232,7 @@
.getEngineServiceParameters().getEngineParameters().getContextParameters()
.getDistributorParameters();
assertEquals("org.onap.policy.apex.service.engine.parameters.dummyclasses.SuperDooperDistributorParameters",
- infinispanParameters.getClass().getCanonicalName());
+ infinispanParameters.getClass().getName());
assertEquals("my/lovely/configFile.xml", infinispanParameters.getConfigFile());
assertEquals("holy/stone.xml", infinispanParameters.getJgroupsFile());
assertEquals(false, infinispanParameters.isPreferIPv4Stack());
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ExecutorParameterTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ExecutorParameterTests.java
index e77767d..4ba63a3 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ExecutorParameterTests.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ExecutorParameterTests.java
@@ -211,7 +211,7 @@
assertEquals(19, parameters.getEngineServiceParameters().getInstanceCount());
assertEquals(65522, parameters.getEngineServiceParameters().getDeploymentPort());
assertTrue(parameters.getEngineServiceParameters().getPolicyModelFileName()
- .endsWith("/src/test/resources/policymodels/SmallModel.json"));
+ .endsWith("policymodels/SmallModel.json"));
} catch (final ParameterException e) {
fail("This test should not throw any exception: " + e.getMessage());
}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java
index 10b9ab3..5dd0011 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java
@@ -206,9 +206,9 @@
.getCarrierTechnologyParameters().getLabel());
assertEquals("FILE", parameters.getEventOutputParameters().get("MyOtherProducer")
.getCarrierTechnologyParameters().getLabel());
- assertEquals(ApexFileEventProducer.class.getCanonicalName(), parameters.getEventOutputParameters()
+ assertEquals(ApexFileEventProducer.class.getName(), parameters.getEventOutputParameters()
.get("MyOtherProducer").getCarrierTechnologyParameters().getEventProducerPluginClass());
- assertEquals(ApexFileEventConsumer.class.getCanonicalName(), parameters.getEventOutputParameters()
+ assertEquals(ApexFileEventConsumer.class.getName(), parameters.getEventOutputParameters()
.get("MyOtherProducer").getCarrierTechnologyParameters().getEventConsumerPluginClass());
assertEquals("JSON",
parameters.getEventOutputParameters().get("FirstProducer").getEventProtocolParameters().getLabel());
@@ -225,13 +225,13 @@
.getEventProtocolParameters().getLabel());
assertEquals("SUPER_TOK_DEL", parameters.getEventInputParameters().get("MySuperDooperConsumer1")
.getEventProtocolParameters().getLabel());
- assertEquals(ApexFileEventProducer.class.getCanonicalName(), parameters.getEventInputParameters()
+ assertEquals(ApexFileEventProducer.class.getName(), parameters.getEventInputParameters()
.get("TheFileConsumer1").getCarrierTechnologyParameters().getEventProducerPluginClass());
- assertEquals(ApexFileEventConsumer.class.getCanonicalName(), parameters.getEventInputParameters()
+ assertEquals(ApexFileEventConsumer.class.getName(), parameters.getEventInputParameters()
.get("TheFileConsumer1").getCarrierTechnologyParameters().getEventConsumerPluginClass());
- assertEquals(SuperDooperEventProducer.class.getCanonicalName(), parameters.getEventInputParameters()
+ assertEquals(SuperDooperEventProducer.class.getName(), parameters.getEventInputParameters()
.get("MySuperDooperConsumer1").getCarrierTechnologyParameters().getEventProducerPluginClass());
- assertEquals(SuperDooperEventSubscriber.class.getCanonicalName(), parameters.getEventInputParameters()
+ assertEquals(SuperDooperEventSubscriber.class.getName(), parameters.getEventInputParameters()
.get("MySuperDooperConsumer1").getCarrierTechnologyParameters().getEventConsumerPluginClass());
} catch (final ParameterException e) {
fail("This test should not throw an exception");
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventProtocolParameters.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventProtocolParameters.java
index 8af9d57..9197dfe 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventProtocolParameters.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventProtocolParameters.java
@@ -46,6 +46,6 @@
this.setStartDelimiterToken(SUPER_TOKEN_DELIMITER);
// Set the event protocol plugin class
- this.setEventProtocolPluginClass(SuperTokenDelimitedEventConverter.class.getCanonicalName());
+ this.setEventProtocolPluginClass(SuperTokenDelimitedEventConverter.class.getName());
}
}
diff --git a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/runtime/impl/EngineServiceImplTest.java b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/runtime/impl/EngineServiceImplTest.java
index fcb207c..27c4a72 100644
--- a/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/runtime/impl/EngineServiceImplTest.java
+++ b/services/services-engine/src/test/java/org/onap/policy/apex/service/engine/runtime/impl/EngineServiceImplTest.java
@@ -220,7 +220,7 @@
}
String status = esImpl.getStatus(esImpl.getEngineKeys().iterator().next());
- assertEquals("{\n \"apexEngineModel\" :", status.substring(0, 24));
+ assertTrue(status.contains("\n \"apexEngineModel\" :"));
assertFalse(esImpl.isStarted());
assertFalse(esImpl.isStarted(null));
@@ -453,8 +453,7 @@
assertEquals(AxEngineState.EXECUTING, esImpl.getState());
String status = esImpl.getStatus(esImpl.getEngineKeys().iterator().next());
- assertEquals("{\n \"apexEngineModel\" :", status.substring(0, 24));
-
+ assertTrue(status.contains("\n \"apexEngineModel\" :"));
assertTrue(esImpl.isStarted());
assertTrue(esImpl.isStarted(esImpl.getEngineKeys().iterator().next()));
assertFalse(esImpl.isStopped());
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterCommandLineArguments.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterCommandLineArguments.java
index 152182b..3697374 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterCommandLineArguments.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterCommandLineArguments.java
@@ -138,7 +138,7 @@
}
if (commandLine.hasOption('h')) {
- return help(Main.class.getCanonicalName());
+ return help(Main.class.getName());
}
if (commandLine.hasOption('v')) {
diff --git a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/ApexStarterRestServer.java b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/ApexStarterRestServer.java
index 02e1fcf..3f2ca72 100644
--- a/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/ApexStarterRestServer.java
+++ b/services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/ApexStarterRestServer.java
@@ -62,7 +62,7 @@
servers = HttpServletServer.factory.build(getServerProperties());
for (final HttpServletServer server : servers) {
if (server.isAaf()) {
- server.addFilterClass(null, ApexStarterAafFilter.class.getCanonicalName());
+ server.addFilterClass(null, ApexStarterAafFilter.class.getName());
}
server.start();
}
@@ -89,7 +89,7 @@
props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_HTTP_PORT_SUFFIX,
Integer.toString(restServerParameters.getPort()));
props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_HTTP_REST_CLASSES_SUFFIX,
- HealthCheckRestControllerV1.class.getCanonicalName());
+ HealthCheckRestControllerV1.class.getName());
props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_MANAGED_SUFFIX, "false");
props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_HTTP_SWAGGER_SUFFIX, "true");
props.setProperty(svcpfx + PolicyEndPointProperties.PROPERTY_HTTP_AUTH_USERNAME_SUFFIX,
diff --git a/testsuites/integration/integration-common/src/test/java/org/onap/policy/apex/testsuites/integration/common/model/SampleDomainModelSaverTest.java b/testsuites/integration/integration-common/src/test/java/org/onap/policy/apex/testsuites/integration/common/model/SampleDomainModelSaverTest.java
index 744f47d..ab34f54 100644
--- a/testsuites/integration/integration-common/src/test/java/org/onap/policy/apex/testsuites/integration/common/model/SampleDomainModelSaverTest.java
+++ b/testsuites/integration/integration-common/src/test/java/org/onap/policy/apex/testsuites/integration/common/model/SampleDomainModelSaverTest.java
@@ -43,7 +43,7 @@
SampleDomainModelSaver.main(null);
fail("test should throw an exception");
} catch (Exception exc) {
- assertEquals("java.lang.NullPointerException", exc.getClass().getCanonicalName());
+ assertEquals("java.lang.NullPointerException", exc.getClass().getName());
}
String[] args0 =
diff --git a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/TestConcurrentContext.java b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/TestConcurrentContext.java
index 0759b7e..ae818f2 100644
--- a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/TestConcurrentContext.java
+++ b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/TestConcurrentContext.java
@@ -171,7 +171,7 @@
logger.debug("Running testConcurrentContextJVMLocalVarSet test . . .");
final ContextParameters contextParameters = new ContextParameters();
- contextParameters.getLockManagerParameters().setPluginClass(JvmLocalLockManager.class.getCanonicalName());
+ contextParameters.getLockManagerParameters().setPluginClass(JvmLocalLockManager.class.getName());
setContextParmetersInParameterService(contextParameters);
final ConfigrationProvider configrationProvider = getConfigrationProvider("JVMLocalVarSet",
@@ -229,8 +229,8 @@
logger.debug("Running testConcurrentContextMultiJVMNoLock test . . .");
final ContextParameters contextParameters = new ContextParameters();
- contextParameters.getDistributorParameters().setPluginClass(JvmLocalDistributor.class.getCanonicalName());
- contextParameters.getLockManagerParameters().setPluginClass(JvmLocalLockManager.class.getCanonicalName());
+ contextParameters.getDistributorParameters().setPluginClass(JvmLocalDistributor.class.getName());
+ contextParameters.getLockManagerParameters().setPluginClass(JvmLocalLockManager.class.getName());
setContextParmetersInParameterService(contextParameters);
final ConfigrationProvider configrationProvider = getConfigrationProvider("testConcurrentContextMultiJVMNoLock",
@@ -259,7 +259,7 @@
final ContextParameters contextParameters = new ContextParameters();
contextParameters.getDistributorParameters().setPluginClass(DEFAULT_DISTRIBUTOR_PLUGIN_CLASS);
- contextParameters.getLockManagerParameters().setPluginClass(HazelcastLockManager.class.getCanonicalName());
+ contextParameters.getLockManagerParameters().setPluginClass(HazelcastLockManager.class.getName());
setContextParmetersInParameterService(contextParameters);
final ConfigrationProvider configrationProvider = getConfigrationProvider("HazelcastLock",
@@ -292,7 +292,7 @@
distributorParameters.setPluginClass(DEFAULT_DISTRIBUTOR_PLUGIN_CLASS);
final CuratorLockManagerParameters curatorParameters = new CuratorLockManagerParameters();
- curatorParameters.setPluginClass(CuratorLockManager.class.getCanonicalName());
+ curatorParameters.setPluginClass(CuratorLockManager.class.getName());
curatorParameters.setZookeeperAddress(ZOOKEEPER_ADDRESS + ":" + zookeeperPort);
contextParameters.setLockManagerParameters(curatorParameters);
setContextParmetersInParameterService(contextParameters);
@@ -325,8 +325,8 @@
final ContextParameters contextParameters = new ContextParameters();
final DistributorParameters distributorParameters = contextParameters.getDistributorParameters();
- distributorParameters.setPluginClass(HazelcastContextDistributor.class.getCanonicalName());
- contextParameters.getLockManagerParameters().setPluginClass(HazelcastLockManager.class.getCanonicalName());
+ distributorParameters.setPluginClass(HazelcastContextDistributor.class.getName());
+ contextParameters.getLockManagerParameters().setPluginClass(HazelcastLockManager.class.getName());
setContextParmetersInParameterService(contextParameters);
final ConfigrationProvider configrationProvider = getConfigrationProvider("HazelcastMultiHazelcastlock",
@@ -358,10 +358,10 @@
final ContextParameters contextParameters = new ContextParameters();
final InfinispanDistributorParameters infinispanParameters = new InfinispanDistributorParameters();
- infinispanParameters.setPluginClass(InfinispanContextDistributor.class.getCanonicalName());
+ infinispanParameters.setPluginClass(InfinispanContextDistributor.class.getName());
infinispanParameters.setConfigFile("infinispan/infinispan-context-test.xml");
contextParameters.setDistributorParameters(infinispanParameters);
- contextParameters.getLockManagerParameters().setPluginClass(HazelcastLockManager.class.getCanonicalName());
+ contextParameters.getLockManagerParameters().setPluginClass(HazelcastLockManager.class.getName());
setContextParmetersInParameterService(contextParameters);
final ConfigrationProvider configrationProvider = getConfigrationProvider("InfinispanMultiHazelcastlock",
@@ -393,12 +393,12 @@
startZookeeperServer();
final InfinispanDistributorParameters infinispanParameters = new InfinispanDistributorParameters();
- infinispanParameters.setPluginClass(InfinispanContextDistributor.class.getCanonicalName());
+ infinispanParameters.setPluginClass(InfinispanContextDistributor.class.getName());
infinispanParameters.setConfigFile("infinispan/infinispan-context-test.xml");
contextParameters.setDistributorParameters(infinispanParameters);
final CuratorLockManagerParameters curatorParameters = new CuratorLockManagerParameters();
- curatorParameters.setPluginClass(CuratorLockManager.class.getCanonicalName());
+ curatorParameters.setPluginClass(CuratorLockManager.class.getName());
curatorParameters.setZookeeperAddress(ZOOKEEPER_ADDRESS + ":" + zookeeperPort);
contextParameters.setLockManagerParameters(curatorParameters);
setContextParmetersInParameterService(contextParameters);
@@ -435,10 +435,10 @@
startZookeeperServer();
contextParameters.getDistributorParameters()
- .setPluginClass(HazelcastContextDistributor.class.getCanonicalName());
+ .setPluginClass(HazelcastContextDistributor.class.getName());
final CuratorLockManagerParameters curatorParameters = new CuratorLockManagerParameters();
- curatorParameters.setPluginClass(CuratorLockManager.class.getCanonicalName());
+ curatorParameters.setPluginClass(CuratorLockManager.class.getName());
curatorParameters.setZookeeperAddress(ZOOKEEPER_ADDRESS + ":" + zookeeperPort);
contextParameters.setLockManagerParameters(curatorParameters);
setContextParmetersInParameterService(contextParameters);
diff --git a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/ContextInstantiation.java b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/ContextInstantiation.java
index 502ccc1..a29dcbc 100644
--- a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/ContextInstantiation.java
+++ b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/ContextInstantiation.java
@@ -451,7 +451,7 @@
fail(EXCEPTION_MESSAGE);
} catch (final ContextRuntimeException e) {
assertEquals(getMessage(TEST_POLICY_CONTEXT_ITEM000, "TestContextItem006",
- TestContextStringItem.class.getCanonicalName(), "stringValue=" + STRING_VAL),
+ TestContextStringItem.class.getName(), "stringValue=" + STRING_VAL),
e.getMessage());
LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
}
@@ -461,7 +461,7 @@
fail(EXCEPTION_MESSAGE);
} catch (final ContextRuntimeException e) {
assertEquals(getMessage(TEST_POLICY_CONTEXT_ITEM001, "TestContextItem003",
- TestContextLongItem.class.getCanonicalName(), "longValue=" + INT_VAL_3), e.getMessage());
+ TestContextLongItem.class.getName(), "longValue=" + INT_VAL_3), e.getMessage());
LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
}
}
@@ -527,7 +527,7 @@
}
private String getMessage(final String key, final String objName, final String clazzName, final String valString) {
- return getMessage(key, objName, clazzName, valString, TestPolicyContextItem.class.getCanonicalName());
+ return getMessage(key, objName, clazzName, valString, TestPolicyContextItem.class.getName());
}
private String getMessage(final String key, final String objName, final String clazzName, final String valString,
diff --git a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/HazelcastContextDistributorTest.java b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/HazelcastContextDistributorTest.java
index 9e60025..90d2f19 100644
--- a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/HazelcastContextDistributorTest.java
+++ b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/HazelcastContextDistributorTest.java
@@ -40,7 +40,7 @@
* The Class HazelcastContextDistributorTest.
*/
public class HazelcastContextDistributorTest {
- private static final String HAZEL_CAST_PLUGIN_CLASS = HazelcastContextDistributor.class.getCanonicalName();
+ private static final String HAZEL_CAST_PLUGIN_CLASS = HazelcastContextDistributor.class.getName();
// Logger for this class
private static final XLogger logger = XLoggerFactory.getXLogger(HazelcastContextDistributorTest.class);
diff --git a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/InfinispanContextDistributorTest.java b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/InfinispanContextDistributorTest.java
index b8cc597..db131bf 100644
--- a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/InfinispanContextDistributorTest.java
+++ b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/InfinispanContextDistributorTest.java
@@ -43,7 +43,7 @@
public class InfinispanContextDistributorTest {
private static final XLogger logger = XLoggerFactory.getXLogger(InfinispanContextDistributorTest.class);
- private static final String PLUGIN_CLASS = InfinispanContextDistributor.class.getCanonicalName();
+ private static final String PLUGIN_CLASS = InfinispanContextDistributor.class.getName();
private SchemaParameters schemaParameters;
private ContextParameters contextParameters;
diff --git a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/SequentialContextInstantiation.java b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/SequentialContextInstantiation.java
index 12f7f37..93c0179 100644
--- a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/SequentialContextInstantiation.java
+++ b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/SequentialContextInstantiation.java
@@ -119,8 +119,8 @@
try {
dateAlbum.put("tci9", tci9);
} catch (final Exception e) {
- final String message = "class \"" + TestContextDateTzItem.class.getCanonicalName()
- + "\" not compatible with class \"" + TestContextDateLocaleItem.class.getCanonicalName()
+ final String message = "class \"" + TestContextDateTzItem.class.getName()
+ + "\" not compatible with class \"" + TestContextDateLocaleItem.class.getName()
+ "\"";
assertTrue(e.getMessage().contains(message));
LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
@@ -151,7 +151,7 @@
fail(EXCEPTION_MESSAGE);
} catch (final Exception e) {
assertTrue(e.getMessage().endsWith("not compatible with class \""
- + TestContextDateLocaleItem.class.getCanonicalName() + "\""));
+ + TestContextDateLocaleItem.class.getName() + "\""));
LOGGER.trace(NORMAL_TEST_EXCEPTION, e);
}
assertEquals(5, dateAlbum1.size());
diff --git a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/factory/TestContextAlbumFactory.java b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/factory/TestContextAlbumFactory.java
index f8c1f59..45ea0fd 100644
--- a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/factory/TestContextAlbumFactory.java
+++ b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/factory/TestContextAlbumFactory.java
@@ -54,7 +54,7 @@
private static final String SCHEMAS2 = "Schemas";
private static final String KEY_INFO_MAP_KEY = "KeyInfoMapKey";
private static final String APPLICATION = "APPLICATION";
- private static final String JAVA_LONG = Long.class.getCanonicalName();
+ private static final String JAVA_LONG = Long.class.getName();
private static final String JAVA_FLAVOUR = "Java";
/**
@@ -69,7 +69,7 @@
*/
public static AxContextModel createPolicyContextModel() {
final AxContextSchema policySchema = new AxContextSchema(new AxArtifactKey("PolicySchema", VERSION),
- JAVA_FLAVOUR, TestPolicyContextItem.class.getCanonicalName());
+ JAVA_FLAVOUR, TestPolicyContextItem.class.getName());
final AxContextAlbum albumDefinition = new AxContextAlbum(new AxArtifactKey(POLICY_CONTEXT_ALBUM, VERSION),
APPLICATION, true, policySchema.getKey());
@@ -94,7 +94,7 @@
*/
public static AxContextModel createGlobalContextModel() {
final AxContextSchema globalSchema = new AxContextSchema(new AxArtifactKey("GlobalSchema", VERSION),
- JAVA_FLAVOUR, TestGlobalContextItem.class.getCanonicalName());
+ JAVA_FLAVOUR, TestGlobalContextItem.class.getName());
final AxContextAlbum albumDefinition = new AxContextAlbum(new AxArtifactKey(GLOBAL_CONTEXT_ALBUM, VERSION),
"GLOBAL", true, globalSchema.getKey());
@@ -119,7 +119,7 @@
*/
public static AxContextModel createExternalContextModel() {
final AxContextSchema externalSchema = new AxContextSchema(new AxArtifactKey("ExternalSchema", VERSION),
- JAVA_FLAVOUR, TestExternalContextItem.class.getCanonicalName());
+ JAVA_FLAVOUR, TestExternalContextItem.class.getName());
final AxContextAlbum albumDefinition = new AxContextAlbum(new AxArtifactKey(EXTERNAL_CONTEXT_ALBUM, VERSION),
"EXTERNAL", true, externalSchema.getKey());
@@ -178,11 +178,11 @@
final AxContextSchema longSchema =
new AxContextSchema(new AxArtifactKey("LongSchema", VERSION), JAVA_FLAVOUR, JAVA_LONG);
final AxContextSchema lTypeSchema = new AxContextSchema(new AxArtifactKey("LTypeSchema", VERSION), JAVA_FLAVOUR,
- TestContextLongItem.class.getCanonicalName());
+ TestContextLongItem.class.getName());
final AxContextSchema dateSchema = new AxContextSchema(new AxArtifactKey("DateSchema", VERSION), JAVA_FLAVOUR,
- TestContextDateLocaleItem.class.getCanonicalName());
+ TestContextDateLocaleItem.class.getName());
final AxContextSchema mapSchema = new AxContextSchema(new AxArtifactKey("MapSchema", VERSION), JAVA_FLAVOUR,
- TestContextTreeMapItem.class.getCanonicalName());
+ TestContextTreeMapItem.class.getName());
final AxContextSchemas schemas = new AxContextSchemas(new AxArtifactKey(SCHEMAS2, VERSION));
schemas.getSchemasMap().put(longSchema.getKey(), longSchema);
diff --git a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/locking/ConcurrentContextJvmThread.java b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/locking/ConcurrentContextJvmThread.java
index 3e8105c..4915e7b 100644
--- a/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/locking/ConcurrentContextJvmThread.java
+++ b/testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/locking/ConcurrentContextJvmThread.java
@@ -71,7 +71,7 @@
commandList.add("-Xmx512m");
commandList.add("-cp");
commandList.add(System.getProperty("java.class.path"));
- commandList.add(ConcurrentContextJvm.class.getCanonicalName());
+ commandList.add(ConcurrentContextJvm.class.getName());
commandList.add(configrationProvider.getTestName());
commandList.add(Integer.toString(jvm));
commandList.add(Integer.toString(configrationProvider.getThreadCount()));
@@ -81,7 +81,7 @@
commandList.add(System.getProperty("hazelcast.config", ""));
for (final Entry<String, ParameterGroup> parameterServiceEntry : ParameterService.getAll()) {
- commandList.add(parameterServiceEntry.getValue().getClass().getCanonicalName());
+ commandList.add(parameterServiceEntry.getValue().getClass().getName());
commandList.add(new Gson().toJson(parameterServiceEntry.getValue()));
}
diff --git a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestApexSamplePolicyDbWrite.java b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestApexSamplePolicyDbWrite.java
index 426db83..00dce6e 100644
--- a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestApexSamplePolicyDbWrite.java
+++ b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestApexSamplePolicyDbWrite.java
@@ -55,7 +55,7 @@
@Test
public void testModelWriteReadJpa() throws Exception {
final DaoParameters DaoParameters = new DaoParameters();
- DaoParameters.setPluginClass(DefaultApexDao.class.getCanonicalName());
+ DaoParameters.setPluginClass(DefaultApexDao.class.getName());
DaoParameters.setPersistenceUnit("SampleModelTest");
Connection connection = DriverManager.getConnection("jdbc:h2:mem:testdb");
diff --git a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestApexSamplePolicyModel.java b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestApexSamplePolicyModel.java
index a580095..a2fa423 100644
--- a/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestApexSamplePolicyModel.java
+++ b/testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestApexSamplePolicyModel.java
@@ -90,7 +90,7 @@
@Test
public void testModelWriteReadJpa() throws Exception {
final DaoParameters DaoParameters = new DaoParameters();
- DaoParameters.setPluginClass(DefaultApexDao.class.getCanonicalName());
+ DaoParameters.setPluginClass(DefaultApexDao.class.getName());
DaoParameters.setPersistenceUnit("SampleModelTest");
Connection connection = DriverManager.getConnection("jdbc:h2:mem:testdb");
diff --git a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParametersHandlerTest.java b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParametersHandlerTest.java
index dd8766d..2e70b7b 100644
--- a/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParametersHandlerTest.java
+++ b/testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParametersHandlerTest.java
@@ -23,6 +23,7 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
import org.apache.commons.cli.ParseException;
@@ -257,9 +258,7 @@
handler.parse(args);
fail("test should throw an exception");
} catch (ParseException pe) {
- assertEquals("Could not read parameters from configuration file "
- + "\"src/test/resources/parameters/unit/NonExistant.json\": "
- + "src/test/resources/parameters/unit/NonExistant.json", pe.getMessage());
+ assertTrue(pe.getMessage().startsWith("Could not read parameters from configuration file "));
}
try {
diff --git a/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java b/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java
index aaff84e..fdf8629 100644
--- a/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java
+++ b/tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java
@@ -54,7 +54,7 @@
final String outputString = runModel2Cli(cliArgs);
assertTrue(outputString
- .contains("gen-model2cli: no '-m' model file given, cannot proceed (try -h for help)\n"));
+ .contains("gen-model2cli: no '-m' model file given, cannot proceed (try -h for help)"));
}
@Test