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 --- .../java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java | 2 +- .../org/onap/policy/controlloop/policy/guard/ControlLoopGuardTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'models-interactions/model-yaml/src') diff --git a/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java b/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java index 61d9ed45c..0b61991f1 100644 --- a/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java +++ b/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/ControlLoopPolicyTest.java @@ -124,7 +124,7 @@ public class ControlLoopPolicyTest { } public void dump(Object obj) { - logger.debug("Dumping ", obj.getClass().getCanonicalName()); + logger.debug("Dumping ", obj.getClass().getName()); logger.debug("{}", obj); } } diff --git a/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ControlLoopGuardTest.java b/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ControlLoopGuardTest.java index d90f5418d..3d4cb37dd 100644 --- a/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ControlLoopGuardTest.java +++ b/models-interactions/model-yaml/src/test/java/org/onap/policy/controlloop/policy/guard/ControlLoopGuardTest.java @@ -154,7 +154,7 @@ public class ControlLoopGuardTest { } public void dump(Object obj) { - logger.debug("Dumping {}", obj.getClass().getCanonicalName()); + logger.debug("Dumping {}", obj.getClass().getName()); logger.debug("{}", obj); } } -- cgit 1.2.3-korg