Replace uses of getCanonicalName() with getName() in APEX 97/90297/1
authora.sreekumar <ajith.sreekumar@est.tech>
Fri, 21 Jun 2019 11:21:14 +0000 (11:21 +0000)
committera.sreekumar <ajith.sreekumar@est.tech>
Fri, 21 Jun 2019 11:21:14 +0000 (11:21 +0000)
Change-Id: Ifcd8866e65a7bc1238d5a4137f7bad288a5bfb3b
Issue-ID: POLICY-1861
Signed-off-by: a.sreekumar <ajith.sreekumar@est.tech>
49 files changed:
auth/cli-editor/src/main/java/org/onap/policy/apex/auth/clieditor/ApexCommandLineEditorMain.java
context/context-management/src/main/java/org/onap/policy/apex/context/impl/schema/java/JavaSchemaHelperParameters.java
context/context-management/src/main/java/org/onap/policy/apex/context/parameters/DistributorParameters.java
context/context-management/src/main/java/org/onap/policy/apex/context/parameters/LockManagerParameters.java
core/core-engine/src/test/java/org/onap/policy/apex/core/engine/event/EnFieldTest.java
model/basic-model/src/main/java/org/onap/policy/apex/model/basicmodel/concepts/AxValidationMessage.java
model/basic-model/src/test/java/org/onap/policy/apex/model/basicmodel/concepts/ValidationTest.java
plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/main/java/org/onap/policy/apex/plugins/event/carrier/jms/JmsCarrierTechnologyParameters.java
plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-jms/src/test/java/org/onap/policy/apex/plugins/event/carrier/jms/JmsCarrierTechnologyParametersTest.java
plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-kafka/src/main/java/org/onap/policy/apex/plugins/event/carrier/kafka/KafkaCarrierTechnologyParameters.java
plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restclient/src/main/java/org/onap/policy/apex/plugins/event/carrier/restclient/RestClientCarrierTechnologyParameters.java
plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-restserver/src/main/java/org/onap/policy/apex/plugins/event/carrier/restserver/RestServerCarrierTechnologyParameters.java
plugins/plugins-event/plugins-event-carrier/plugins-event-carrier-websocket/src/main/java/org/onap/policy/apex/plugins/event/carrier/websocket/WebSocketCarrierTechnologyParameters.java
plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/JmsObjectEventProtocolParameters.java
plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-jms/src/main/java/org/onap/policy/apex/plugins/event/protocol/jms/JmsTextEventProtocolParameters.java
plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-xml/src/main/java/org/onap/policy/apex/plugins/event/protocol/xml/XmlEventProtocolParameters.java
plugins/plugins-event/plugins-event-protocol/plugins-event-protocol-yaml/src/main/java/org/onap/policy/apex/plugins/event/protocol/yaml/YamlEventProtocolParameters.java
plugins/plugins-executor/plugins-executor-java/src/main/java/org/onap/policy/apex/plugins/executor/java/JavaExecutorParameters.java
plugins/plugins-executor/plugins-executor-javascript/src/main/java/org/onap/policy/apex/plugins/executor/javascript/JavascriptExecutorParameters.java
plugins/plugins-executor/plugins-executor-jruby/src/main/java/org/onap/policy/apex/plugins/executor/jruby/JrubyExecutorParameters.java
plugins/plugins-executor/plugins-executor-jython/src/main/java/org/onap/policy/apex/plugins/executor/jython/JythonExecutorParameters.java
plugins/plugins-executor/plugins-executor-mvel/src/main/java/org/onap/policy/apex/plugins/executor/mvel/MvelExecutorParameters.java
plugins/plugins-persistence/plugins-persistence-jpa/plugins-persistence-jpa-eclipselink/src/test/java/org/onap/policy/apex/plugins/persistence/jpa/eclipselink/EclipselinkApexDaoTest.java
services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/apexprotocolplugin/ApexEventProtocolParameters.java
services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/eventrequestor/EventRequestorCarrierTechnologyParameters.java
services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/filecarrierplugin/FileCarrierTechnologyParameters.java
services/services-engine/src/main/java/org/onap/policy/apex/service/engine/event/impl/jsonprotocolplugin/JsonEventProtocolParameters.java
services/services-engine/src/main/java/org/onap/policy/apex/service/engine/main/ApexCommandLineArguments.java
services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/carriertechnology/CarrierTechnologyParametersJsonAdapter.java
services/services-engine/src/main/java/org/onap/policy/apex/service/parameters/eventprotocol/EventProtocolParametersJsonAdapter.java
services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ContextParameterTests.java
services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ExecutorParameterTests.java
services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/ParameterTests.java
services/services-engine/src/test/java/org/onap/policy/apex/service/engine/parameters/dummyclasses/SuperTokenDelimitedEventProtocolParameters.java
services/services-engine/src/test/java/org/onap/policy/apex/service/engine/runtime/impl/EngineServiceImplTest.java
services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/ApexStarterCommandLineArguments.java
services/services-onappf/src/main/java/org/onap/policy/apex/services/onappf/rest/ApexStarterRestServer.java
testsuites/integration/integration-common/src/test/java/org/onap/policy/apex/testsuites/integration/common/model/SampleDomainModelSaverTest.java
testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/TestConcurrentContext.java
testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/ContextInstantiation.java
testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/HazelcastContextDistributorTest.java
testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/InfinispanContextDistributorTest.java
testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/distribution/SequentialContextInstantiation.java
testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/factory/TestContextAlbumFactory.java
testsuites/integration/integration-context-test/src/test/java/org/onap/policy/apex/testsuites/integration/context/locking/ConcurrentContextJvmThread.java
testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestApexSamplePolicyDbWrite.java
testsuites/integration/integration-executor-test/src/test/java/org/onap/policy/apex/testsuites/integration/executor/handling/TestApexSamplePolicyModel.java
testsuites/performance/performance-benchmark-test/src/test/java/org/onap/policy/apex/testsuites/performance/benchmark/eventgenerator/EventGeneratorParametersHandlerTest.java
tools/model-generator/src/test/java/org/onap/policy/apex/tools/model/generator/model2cli/Model2CliTest.java

index b632514..fc94243 100644 (file)
@@ -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();
index 01a5df2..7e6df77 100644 (file)
@@ -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) {
index 79310a0..8cb6c59 100644 (file)
@@ -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;
index ed23af1..2f8aa0d 100644 (file)
@@ -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;
index 6228c68..9fd26f1 100644 (file)
@@ -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:"
index 3e09e1c..c98ce51 100644 (file)
@@ -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;
     }
index f30babe..f2f99a8 100644 (file)
@@ -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());
     }
 }
index b34f29e..8aed15e 100644 (file)
@@ -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
 
index 18fc1f6..eb0e3d8 100644 (file)
@@ -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 =
index 6aa9d53..36947ee 100644 (file)
@@ -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";
index c8e5553..258c01d 100644 (file)
@@ -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";
index 76ec577..7f6a09e 100644 (file)
@@ -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;
index 9febeb4..1fc18f6 100644 (file)
@@ -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";
index 86ad000..08875e1 100644 (file)
@@ -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());
     }
 
     /**
index ad6675c..85ca1a8 100644 (file)
@@ -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());
     }
 }
index a65e276..143669d 100644 (file)
@@ -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());
     }
 }
index 3c0011c..b538b58 100644 (file)
@@ -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());
     }
 
     /**
index 64abeac..ade35ce 100644 (file)
@@ -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());
     }
 }
index bbbea93..75591aa 100644 (file)
@@ -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());
     }
 }
index 0245cd8..33d8636 100644 (file)
@@ -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());
     }
 }
index 7a22013..e861a10 100644 (file)
@@ -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());
     }
 }
index 7b57ad4..241d757 100644 (file)
@@ -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());
     }
 }
index 311af82..de3a39e 100644 (file)
@@ -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);
index b9e1648..8df3a65 100644 (file)
@@ -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());
     }
 }
index 839b4bf..0d2be38 100644 (file)
@@ -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
 
     /**
index 73438cc..31cd28d 100644 (file)
@@ -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";
index 5ff795d..d8cd128 100644 (file)
@@ -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
index 7333275..e05e02c 100644 (file)
@@ -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')) {
index 5e320b1..6398008 100644 (file)
@@ -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());
     }
 
     /*
index ba37fe8..b03c365 100644 (file)
@@ -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());
     }
 
     /*
index 56e716d..ab05dc7 100644 (file)
@@ -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());
index e77767d..4ba63a3 100644 (file)
@@ -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());
         }
index 10b9ab3..5dd0011 100644 (file)
@@ -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");
index 8af9d57..9197dfe 100644 (file)
@@ -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());
     }
 }
index fcb207c..27c4a72 100644 (file)
@@ -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());
index 152182b..3697374 100644 (file)
@@ -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')) {
index 02e1fcf..3f2ca72 100644 (file)
@@ -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,
index 744f47d..ab34f54 100644 (file)
@@ -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 =
index 0759b7e..ae818f2 100644 (file)
@@ -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);
index 502ccc1..a29dcbc 100644 (file)
@@ -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,
index 9e60025..90d2f19 100644 (file)
@@ -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);
 
index b8cc597..db131bf 100644 (file)
@@ -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;
index 12f7f37..93c0179 100644 (file)
@@ -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());
index f8c1f59..45ea0fd 100644 (file)
@@ -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);
index 3e8105c..4915e7b 100644 (file)
@@ -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()));
         }
 
index 426db83..00dce6e 100644 (file)
@@ -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");
index a580095..a2fa423 100644 (file)
@@ -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");
index dd8766d..2e70b7b 100644 (file)
@@ -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 {
index aaff84e..fdf8629 100644 (file)
@@ -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