From 1cdad9b78056103a4ca1d1b71d996489787ed702 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Tue, 18 Jun 2019 12:47:14 -0400 Subject: Change getCanonicalName to getName in models Per javadocs, getName() should generally be used instead of Class.getCanonicalName(). This change only applies to classes; it does not apply to File objects. Note: this impacts the output from PfValidationMessage, as it will now list the names of embedded classes with a "$" separator instead of a ".". Change-Id: I2cd64bc0281dd324bf80eac57335a7299a516447 Issue-ID: POLICY-1646 Signed-off-by: Jim Hahn --- .../tosca/authorative/provider/AuthorativeToscaProviderPolicyTest.java | 2 +- .../authorative/provider/AuthorativeToscaProviderPolicyTypeTest.java | 2 +- .../models/tosca/legacy/provider/LegacyProvider4LegacyGuardTest.java | 2 +- .../tosca/legacy/provider/LegacyProvider4LegacyOperationalTest.java | 2 +- .../policy/models/tosca/simple/provider/SimpleToscaProviderTest.java | 2 +- .../simple/serialization/MonitoringPolicyTypeSerializationTest.java | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) (limited to 'models-tosca') diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTest.java index 6c87d7681..8b9003be0 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTest.java @@ -73,7 +73,7 @@ public class AuthorativeToscaProviderPolicyTest { @Before public void setupDao() throws Exception { final DaoParameters daoParameters = new DaoParameters(); - daoParameters.setPluginClass(DefaultPfDao.class.getCanonicalName()); + daoParameters.setPluginClass(DefaultPfDao.class.getName()); daoParameters.setPersistenceUnit("ToscaConceptTest"); diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTypeTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTypeTest.java index c2b387952..8bed1e4a1 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTypeTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/authorative/provider/AuthorativeToscaProviderPolicyTypeTest.java @@ -88,7 +88,7 @@ public class AuthorativeToscaProviderPolicyTypeTest { @Before public void setupDao() throws Exception { final DaoParameters daoParameters = new DaoParameters(); - daoParameters.setPluginClass(DefaultPfDao.class.getCanonicalName()); + daoParameters.setPluginClass(DefaultPfDao.class.getName()); daoParameters.setPersistenceUnit("ToscaConceptTest"); diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyGuardTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyGuardTest.java index 59605ed5b..cc510b74f 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyGuardTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyGuardTest.java @@ -70,7 +70,7 @@ public class LegacyProvider4LegacyGuardTest { @Before public void setupDao() throws Exception { final DaoParameters daoParameters = new DaoParameters(); - daoParameters.setPluginClass(DefaultPfDao.class.getCanonicalName()); + daoParameters.setPluginClass(DefaultPfDao.class.getName()); daoParameters.setPersistenceUnit("ToscaConceptTest"); diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyOperationalTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyOperationalTest.java index dfbba4497..4dd998ee9 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyOperationalTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/legacy/provider/LegacyProvider4LegacyOperationalTest.java @@ -65,7 +65,7 @@ public class LegacyProvider4LegacyOperationalTest { @Before public void setupDao() throws Exception { final DaoParameters daoParameters = new DaoParameters(); - daoParameters.setPluginClass(DefaultPfDao.class.getCanonicalName()); + daoParameters.setPluginClass(DefaultPfDao.class.getName()); daoParameters.setPersistenceUnit("ToscaConceptTest"); diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaProviderTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaProviderTest.java index 5e7e8fd5c..a3e3ba518 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaProviderTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/provider/SimpleToscaProviderTest.java @@ -67,7 +67,7 @@ public class SimpleToscaProviderTest { @Before public void setupDao() throws Exception { final DaoParameters daoParameters = new DaoParameters(); - daoParameters.setPluginClass(DefaultPfDao.class.getCanonicalName()); + daoParameters.setPluginClass(DefaultPfDao.class.getName()); daoParameters.setPersistenceUnit("ToscaConceptTest"); diff --git a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicyTypeSerializationTest.java b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicyTypeSerializationTest.java index aa4fc952c..20ba756e9 100644 --- a/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicyTypeSerializationTest.java +++ b/models-tosca/src/test/java/org/onap/policy/models/tosca/simple/serialization/MonitoringPolicyTypeSerializationTest.java @@ -205,7 +205,7 @@ public class MonitoringPolicyTypeSerializationTest { firstDataTypeFirstProperty.getDescription()); assertTrue(firstDataTypeFirstProperty.getConstraints().size() == 1); assertEquals("org.onap.policy.models.tosca.simple.concepts.JpaToscaConstraintValidValues", - firstDataTypeFirstProperty.getConstraints().iterator().next().getClass().getCanonicalName()); + firstDataTypeFirstProperty.getConstraints().iterator().next().getClass().getName()); assertTrue(((JpaToscaConstraintValidValues) (firstDataTypeFirstProperty.getConstraints().iterator().next())) .getValidValues().size() == 2); -- cgit 1.2.3-korg