From bf6126968adcabff605775f554642dfff0644530 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Mon, 17 Jun 2019 10:03:57 -0400 Subject: Change getCanonicalName() to getName() in drools-apps 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: Ie402ab9239b2d5149c420d495f16bb82417d2d25 Issue-ID: POLICY-1646 Signed-off-by: Jim Hahn --- .../test/java/org/onap/policy/controlloop/ControlLoopLoggerTest.java | 3 ++- .../java/org/onap/policy/controlloop/ControlLoopPublisherTest.java | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) (limited to 'controlloop/common/eventmanager/src/test') diff --git a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/ControlLoopLoggerTest.java b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/ControlLoopLoggerTest.java index 6c5264e1c..4e2719075 100644 --- a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/ControlLoopLoggerTest.java +++ b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/ControlLoopLoggerTest.java @@ -3,6 +3,7 @@ * eventmanager * ================================================================================ * Copyright (C) 2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +32,7 @@ public class ControlLoopLoggerTest { @Test public void testControlLoopLogger() throws ControlLoopException { ControlLoopLogger logger = - new ControlLoopLogger.Factory().buildLogger(ControlLoopLoggerStdOutImpl.class.getCanonicalName()); + new ControlLoopLogger.Factory().buildLogger(ControlLoopLoggerStdOutImpl.class.getName()); assertNotNull(logger); logger.info("a log message", "and another", " and another"); logger.metrics("a metric", "and another", " and another"); diff --git a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/ControlLoopPublisherTest.java b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/ControlLoopPublisherTest.java index 309aeb206..77a3d643f 100644 --- a/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/ControlLoopPublisherTest.java +++ b/controlloop/common/eventmanager/src/test/java/org/onap/policy/controlloop/ControlLoopPublisherTest.java @@ -3,6 +3,7 @@ * eventmanager * ================================================================================ * Copyright (C) 2018 Ericsson. All rights reserved. + * Modifications Copyright (C) 2019 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,7 +32,7 @@ public class ControlLoopPublisherTest { @Test public void testControlLoopPublisher() throws ControlLoopException { ControlLoopPublisher publisher = - new ControlLoopPublisher.Factory().buildLogger(ControlLoopPublisherJUnitImpl.class.getCanonicalName()); + new ControlLoopPublisher.Factory().buildLogger(ControlLoopPublisherJUnitImpl.class.getName()); assertNotNull(publisher); try { -- cgit 1.2.3-korg