diff options
author | adheli.tavares <adheli.tavares@est.tech> | 2023-08-30 14:57:10 +0100 |
---|---|---|
committer | adheli.tavares <adheli.tavares@est.tech> | 2023-09-22 16:08:42 +0100 |
commit | fc19178b956f4474ed14e810fd911ac60f3756d0 (patch) | |
tree | 196af66a25ca190af8f2b2199f977a4e58aad8b3 /controlloop/common/feature-controlloop-utils/src | |
parent | d7d54fef032a2ba3118232506a7ed37f24eb4131 (diff) |
Upgrade Java 17 in policy-drools-apps
Issue-ID: POLICY-4816
Change-Id: I61d5c2c0b8bf2cc08416d91bbd84f27f2ed5c5c1
Signed-off-by: adheli.tavares <adheli.tavares@est.tech>
Diffstat (limited to 'controlloop/common/feature-controlloop-utils/src')
2 files changed, 8 insertions, 6 deletions
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)); |