From fc19178b956f4474ed14e810fd911ac60f3756d0 Mon Sep 17 00:00:00 2001 From: "adheli.tavares" Date: Wed, 30 Aug 2023 14:57:10 +0100 Subject: Upgrade Java 17 in policy-drools-apps Issue-ID: POLICY-4816 Change-Id: I61d5c2c0b8bf2cc08416d91bbd84f27f2ed5c5c1 Signed-off-by: adheli.tavares --- .../common/feature-controlloop-utils/pom.xml | 218 ++++++++++----------- .../feature/utils/ControlLoopUtilsFeature.java | 3 +- .../feature/utils/ControlLoopUtilsFeatureTest.java | 11 +- 3 files changed, 117 insertions(+), 115 deletions(-) (limited to 'controlloop/common/feature-controlloop-utils') diff --git a/controlloop/common/feature-controlloop-utils/pom.xml b/controlloop/common/feature-controlloop-utils/pom.xml index 8ac20b19a..fe74bb9ad 100644 --- a/controlloop/common/feature-controlloop-utils/pom.xml +++ b/controlloop/common/feature-controlloop-utils/pom.xml @@ -3,7 +3,7 @@ ONAP ================================================================================ Copyright (C) 2017-2018 AT&T Intellectual Property. All rights reserved. - Modifications Copyright (C) 2019 Nordix Foundation. + Modifications Copyright (C) 2019, 2023 Nordix Foundation. Modifications Copyright (C) 2020 Bell Canada. ================================================================================ Licensed under the Apache License, Version 2.0 (the "License"); @@ -20,116 +20,116 @@ ============LICENSE_END========================================================= --> - - 4.0.0 + + 4.0.0 - - org.onap.policy.drools-applications.controlloop.common - drools-applications-common - 2.0.0-SNAPSHOT - + + org.onap.policy.drools-applications.controlloop.common + drools-applications-common + 2.0.1-SNAPSHOT + - feature-controlloop-utils + feature-controlloop-utils - - Loadable PDP-D feature module to enable simulator usage in a non-junit - lab environments. In a pdp-d lab environment this capability can be - enabled with the "feature" mechanisms. - - - - 1.8 - 1.8 - + + Loadable PDP-D feature module to enable simulator usage in a non-junit + lab environments. In a pdp-d lab environment this capability can be + enabled with the "feature" mechanisms. + - - - - maven-assembly-plugin - - - zipfile - - single - - package - - true - ${project.artifactId}-${project.version} - - src/assembly/assemble_zip.xml - - false - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-dependencies - - copy-dependencies - - prepare-package - - false - ${project.build.directory}/assembly/lib - false - true - true - false - false - false - runtime - true - - - - - - - - - - org.onap.policy.drools-pdp - policy-management - ${version.policy.drools-pdp} - provided - - - org.onap.policy.common - policy-endpoints - ${version.policy.common} - provided - - - org.onap.policy.models.policy-models-interactions - simulators - ${policy.models.version} - - - org.onap.policy.models.policy-models-interactions.model-impl - aai - ${policy.models.version} - - - org.onap.policy.models.policy-models-interactions.model-impl - so - ${policy.models.version} - - - org.onap.policy.models.policy-models-interactions.model-impl - sdnc - ${policy.models.version} - - - org.onap.policy.models.policy-models-interactions.model-impl - rest - ${policy.models.version} - - + + 1.8 + 1.8 + + + + + + maven-assembly-plugin + + + zipfile + + single + + package + + true + ${project.artifactId}-${project.version} + + src/assembly/assemble_zip.xml + + false + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + copy-dependencies + + copy-dependencies + + prepare-package + + ${project.build.directory}/assembly/lib + false + true + true + false + false + false + runtime + true + + + + + + + + + + org.onap.policy.drools-pdp + policy-management + ${version.policy.drools-pdp} + provided + + + org.onap.policy.common + policy-endpoints + ${version.policy.common} + provided + + + org.onap.policy.models.policy-models-interactions + simulators + ${policy.models.version} + + + org.onap.policy.models.policy-models-interactions.model-impl + aai + ${policy.models.version} + + + org.onap.policy.models.policy-models-interactions.model-impl + so + ${policy.models.version} + + + org.onap.policy.models.policy-models-interactions.model-impl + sdnc + ${policy.models.version} + + + org.onap.policy.models.policy-models-interactions.model-impl + rest + ${policy.models.version} + + diff --git a/controlloop/common/feature-controlloop-utils/src/main/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeature.java b/controlloop/common/feature-controlloop-utils/src/main/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeature.java index 98a3b2dae..bc6bbd729 100644 --- a/controlloop/common/feature-controlloop-utils/src/main/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeature.java +++ b/controlloop/common/feature-controlloop-utils/src/main/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeature.java @@ -3,6 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2017-2019, 2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -33,7 +34,7 @@ import org.slf4j.LoggerFactory; */ public class ControlLoopUtilsFeature implements PolicyEngineFeatureApi { - private static Logger logger = LoggerFactory.getLogger(ControlLoopUtilsFeature.class); + private static final Logger logger = LoggerFactory.getLogger(ControlLoopUtilsFeature.class); @Override public boolean afterStart(PolicyEngine engine) { diff --git a/controlloop/common/feature-controlloop-utils/src/test/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeatureTest.java b/controlloop/common/feature-controlloop-utils/src/test/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeatureTest.java index 069b370b6..5d1c52ca0 100644 --- a/controlloop/common/feature-controlloop-utils/src/test/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeatureTest.java +++ b/controlloop/common/feature-controlloop-utils/src/test/java/org/onap/policy/drools/apps/controlloop/feature/utils/ControlLoopUtilsFeatureTest.java @@ -3,6 +3,7 @@ * ONAP * ================================================================================ * Copyright (C) 2017-2021 AT&T Intellectual Property. All rights reserved. + * Modifications Copyright (C) 2023 Nordix Foundation. * ================================================================================ * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -20,9 +21,9 @@ package org.onap.policy.drools.apps.controlloop.feature.utils; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNotNull; -import org.junit.Test; +import org.junit.jupiter.api.Test; import org.onap.policy.common.endpoints.http.server.HttpServletServerFactoryInstance; import org.onap.policy.common.utils.logging.LoggerUtils; import org.onap.policy.drools.system.PolicyEngineConstants; @@ -31,13 +32,13 @@ import org.onap.policy.simulators.Util; /** * ControlLoopUtilsFeature JUnit Tests. */ -public class ControlLoopUtilsFeatureTest { +class ControlLoopUtilsFeatureTest { @Test - public void testSimulate() { + void testSimulate() { LoggerUtils.setLevel("ROOT", "INFO"); LoggerUtils.setLevel("org.eclipse.jetty", "WARN"); - final ControlLoopUtilsFeature feature = new ControlLoopUtilsFeature(); + final var feature = new ControlLoopUtilsFeature(); feature.afterStart(PolicyEngineConstants.getManager()); assertNotNull(HttpServletServerFactoryInstance.getServerFactory().get(Util.AAISIM_SERVER_PORT)); assertNotNull(HttpServletServerFactoryInstance.getServerFactory().get(Util.SOSIM_SERVER_PORT)); -- cgit