diff options
author | a.sreekumar <ajith.sreekumar@est.tech> | 2019-06-21 11:21:14 +0000 |
---|---|---|
committer | a.sreekumar <ajith.sreekumar@est.tech> | 2019-06-21 11:21:14 +0000 |
commit | 5be846bcdbe6e9dfa3b81e4b95de37acea18d1a2 (patch) | |
tree | 596c0caffb095e693ac63267d8f804eb0b630196 | |
parent | 3b7b20029b7b663506b7c918f333f09dd18d6452 (diff) |
Replace uses of getCanonicalName() with getName() in APEX
Change-Id: Ifcd8866e65a7bc1238d5a4137f7bad288a5bfb3b
Issue-ID: POLICY-1861
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
49 files changed, 118 insertions, 121 deletions
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 b632514a5..fc9424357 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 @@ public class ApexCommandLineEditorMain { 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 01a5df20b..7e6df77f3 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 @@ package org.onap.policy.apex.context.impl.schema.java; 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 class JavaSchemaHelperParameters extends SchemaHelperParameters { */ 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 @@ public class JavaSchemaHelperParameters extends SchemaHelperParameters { /** * 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 79310a0e2..8cb6c5916 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 @@ import org.onap.policy.common.parameters.ParameterGroup; */ 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 ed23af1b6..2f8aa0d2a 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 @@ public class LockManagerParameters implements ParameterGroup { /** * 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 6228c6834..9fd26f191 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 @@ public class EnFieldTest { 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 3e09e1ca8..c98ce5178 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 @@ public class AxValidationMessage { 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 f30babe91..f2f99a811 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 @@ public class ValidationTest { 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 b34f29ef1..8aed15ece 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 class JmsCarrierTechnologyParameters extends CarrierTechnologyParameters 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 18fc1f63e..eb0e3d888 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 class JmsCarrierTechnologyParametersTest { 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 6aa9d53e6..36947ee13 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 class KafkaCarrierTechnologyParameters extends CarrierTechnologyParameter 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 @@ public class KafkaCarrierTechnologyParameters extends CarrierTechnologyParameter 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 c8e555368..258c01d3f 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 class RestClientCarrierTechnologyParameters extends CarrierTechnologyPara 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 76ec577b8..7f6a09e11 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 class RestServerCarrierTechnologyParameters extends CarrierTechnologyPara 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 9febeb45b..1fc18f6e2 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 class WebSocketCarrierTechnologyParameters extends CarrierTechnologyParam 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 86ad0009e..08875e182 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 @@ public class JmsObjectEventProtocolParameters extends EventProtocolParameters { 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 ad6675c43..85ca1a8aa 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 @@ public class JmsTextEventProtocolParameters extends JsonEventProtocolParameters 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 a65e2761b..143669db1 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 @@ public class XmlEventProtocolParameters extends EventProtocolTextTokenDelimitedP 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 3c0011c24..b538b58f9 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 @@ public class YamlEventProtocolParameters extends EventProtocolTextTokenDelimited 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 64abeac47..ade35ced3 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 @@ public class JavaExecutorParameters extends ExecutorParameters { * 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 bbbea9308..75591aa83 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 @@ public class JavascriptExecutorParameters extends ExecutorParameters { * 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 0245cd80d..33d863632 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 @@ public class JrubyExecutorParameters extends ExecutorParameters { * 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 7a22013f1..e861a1071 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 @@ public class JythonExecutorParameters extends ExecutorParameters { * 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 7b57ad446..241d75702 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 @@ public class MvelExecutorParameters extends ExecutorParameters { * 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 311af8257..de3a39ebd 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 @@ public class EclipselinkApexDaoTest { */ @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 b9e1648f1..8df3a6553 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 @@ public class ApexEventProtocolParameters extends EventProtocolParameters { 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 839b4bffe..0d2be38f8 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 @@ public class EventRequestorCarrierTechnologyParameters extends CarrierTechnology /** 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 73438cc7e..31cd28d8d 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 class FileCarrierTechnologyParameters extends CarrierTechnologyParameters 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 5ff795d76..d8cd12829 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 @@ public class JsonEventProtocolParameters extends EventProtocolTextCharDelimitedP 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 733327580..e05e02c14 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 @@ public class ApexCommandLineArguments { } 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 5e320b1bb..6398008c6 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 @@ public class CarrierTechnologyParametersJsonAdapter // 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 ba37fe80c..b03c365f1 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 @@ public class EventProtocolParametersJsonAdapter // 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 56e716dd6..ab05dc7f0 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 @@ public class ContextParameterTests { 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 @@ public class ContextParameterTests { 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 @@ public class ContextParameterTests { 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 @@ public class ContextParameterTests { 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 @@ public class ContextParameterTests { 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 @@ public class ContextParameterTests { .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 e77767d44..4ba63a3cd 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 @@ public class ExecutorParameterTests { 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 10b9ab31d..5dd00117c 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 @@ public class ParameterTests { .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 @@ public class ParameterTests { .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 8af9d57d9..9197dfebf 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 @@ public class SuperTokenDelimitedEventProtocolParameters extends EventProtocolTex 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 fcb207c62..27c4a7205 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 @@ public class EngineServiceImplTest { } 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 @@ public class EngineServiceImplTest { 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 152182b52..369737440 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 @@ public class ApexStarterCommandLineArguments { } 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 02e1fcf70..3f2ca7224 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 @@ public class ApexStarterRestServer implements Startable { 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 @@ public class ApexStarterRestServer implements Startable { 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 744f47db8..ab34f5442 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 @@ public class SampleDomainModelSaverTest { 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 0759b7eeb..ae818f223 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 @@ public class TestConcurrentContext { 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 @@ public class TestConcurrentContext { 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 @@ public class TestConcurrentContext { 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 @@ public class TestConcurrentContext { 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 @@ public class TestConcurrentContext { 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 @@ public class TestConcurrentContext { 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 @@ public class TestConcurrentContext { 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 @@ public class TestConcurrentContext { 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 502ccc17c..a29dcbcf8 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 @@ public class ContextInstantiation { 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 @@ public class ContextInstantiation { 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 @@ public class ContextInstantiation { } 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 9e6002565..90d2f19a9 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 @@ import org.slf4j.ext.XLoggerFactory; * 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 b8cc597ef..db131bf0d 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 @@ import org.slf4j.ext.XLoggerFactory; 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 12f7f373f..93c0179f8 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 @@ public class SequentialContextInstantiation { 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 @@ public class SequentialContextInstantiation { 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 f8c1f597c..45ea0fdc4 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 @@ public final class TestContextAlbumFactory { 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 final class TestContextAlbumFactory { */ 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 final class TestContextAlbumFactory { */ 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 final class TestContextAlbumFactory { */ 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 @@ public final class TestContextAlbumFactory { 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 3e8105c86..4915e7b89 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 @@ public class ConcurrentContextJvmThread implements Runnable, Closeable { 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 @@ public class ConcurrentContextJvmThread implements Runnable, Closeable { 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 426db8328..00dce6e66 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 @@ public class TestApexSamplePolicyDbWrite { @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 a5800956d..a2fa423bf 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 @@ public class TestApexSamplePolicyModel { @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 dd8766dc3..2e70b7b3f 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 @@ package org.onap.policy.apex.testsuites.performance.benchmark.eventgenerator; 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 @@ public class EventGeneratorParametersHandlerTest { 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 aaff84eeb..fdf862930 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 @@ public class Model2CliTest { 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 |