From aecbc1cba6e862c3d842012ce54d121764f78cb0 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Fri, 14 Jun 2019 10:58:51 -0400 Subject: Change getCanonicalName() to getName() in common Per javadocs, getName() should generally be used instead of Class.getCanonicalName(). This change only applies to classes; it does not apply to File objects. Change-Id: Iea0995d1167f4837607f194d35f0193eeedeacd7 Issue-ID: POLICY-1646 Signed-off-by: Jim Hahn --- .../java/org/onap/policy/common/parameters/GroupValidationResult.java | 2 +- .../org/onap/policy/common/parameters/ParameterValidationResult.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'common-parameters/src/main/java/org') diff --git a/common-parameters/src/main/java/org/onap/policy/common/parameters/GroupValidationResult.java b/common-parameters/src/main/java/org/onap/policy/common/parameters/GroupValidationResult.java index 3dc01299..ad2eb695 100644 --- a/common-parameters/src/main/java/org/onap/policy/common/parameters/GroupValidationResult.java +++ b/common-parameters/src/main/java/org/onap/policy/common/parameters/GroupValidationResult.java @@ -339,7 +339,7 @@ public class GroupValidationResult extends CommonGroupValidationResult { if (parameterGroup != null) { result.append(parameterGroup.getName()); result.append("\" type \""); - result.append(parameterGroup.getClass().getCanonicalName()); + result.append(parameterGroup.getClass().getName()); } else { result.append("UNDEFINED"); } diff --git a/common-parameters/src/main/java/org/onap/policy/common/parameters/ParameterValidationResult.java b/common-parameters/src/main/java/org/onap/policy/common/parameters/ParameterValidationResult.java index 2c367a30..35837376 100644 --- a/common-parameters/src/main/java/org/onap/policy/common/parameters/ParameterValidationResult.java +++ b/common-parameters/src/main/java/org/onap/policy/common/parameters/ParameterValidationResult.java @@ -163,7 +163,7 @@ public class ParameterValidationResult implements ValidationResult { validationResultBuilder.append("field \""); validationResultBuilder.append(getName()); validationResultBuilder.append("\" type \""); - validationResultBuilder.append(field.getType().getCanonicalName()); + validationResultBuilder.append(field.getType().getName()); validationResultBuilder.append("\" value \""); validationResultBuilder.append(parameterValue); validationResultBuilder.append("\" "); -- cgit 1.2.3-korg